Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d963971

Browse files
Update ExtPlayerProtocol.swift
1 parent 79d2810 commit d963971

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

‎Sources/swiftui-loop-videoplayer/protocol/player/ExtPlayerProtocol.swift‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -264,24 +264,24 @@ internal extension ExtPlayerProtocol {
264264

265265
timeControlObserver = player.observe(\.timeControlStatus, options: [.new, .old]) { [weak self] player, change in
266266
switch player.timeControlStatus {
267-
case .paused:
268-
// This could mean playback has stopped, but it's not specific to end of playback
269-
Task { @MainActor in
270-
self?.delegate?.didPausePlayback()
271-
}
272-
case .waitingToPlayAtSpecifiedRate:
273-
// Player is waiting to play (e.g., buffering)
274-
Task { @MainActor in
275-
self?.delegate?.isWaitingToPlay()
276-
}
277-
case .playing:
278-
// Player is currently playing
279-
Task { @MainActor in
280-
self?.delegate?.didStartPlaying()
267+
case .paused:
268+
// This could mean playback has stopped, but it's not specific to end of playback
269+
Task { @MainActor in
270+
self?.delegate?.didPausePlayback()
271+
}
272+
case .waitingToPlayAtSpecifiedRate:
273+
// Player is waiting to play (e.g., buffering)
274+
Task { @MainActor in
275+
self?.delegate?.isWaitingToPlay()
276+
}
277+
case .playing:
278+
// Player is currently playing
279+
Task { @MainActor in
280+
self?.delegate?.didStartPlaying()
281+
}
282+
@unknown default:
283+
break
281284
}
282-
@unknown default:
283-
break
284-
}
285285
}
286286

287287
currentItemObserver = player.observe(\.currentItem, options: [.new, .old, .initial]) { [weak self] player, change in

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /