Skip to content

Commit ab6db78

Browse files
committed
fix: Restore playback session after calling seekTo
1 parent b07f9e1 commit ab6db78

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

ios/BrightcovePlayer.m

+7-3
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,14 @@ - (void)seekTo:(NSNumber *)time {
166166
}
167167

168168
- (void)playbackController:(id<BCOVPlaybackController>)controller playbackSession:(id<BCOVPlaybackSession>)session didReceiveLifecycleEvent:(BCOVPlaybackSessionLifecycleEvent *)lifecycleEvent {
169-
if (lifecycleEvent.eventType == kBCOVPlaybackSessionLifecycleEventPlaybackBufferEmpty) {
169+
if (lifecycleEvent.eventType == kBCOVPlaybackSessionLifecycleEventPlaybackBufferEmpty || lifecycleEvent.eventType == kBCOVPlaybackSessionLifecycleEventFail ||
170+
lifecycleEvent.eventType == kBCOVPlaybackSessionLifecycleEventError ||
171+
lifecycleEvent.eventType == kBCOVPlaybackSessionLifecycleEventTerminate) {
170172
_playbackSession = nil;
171-
} else if (lifecycleEvent.eventType == kBCOVPlaybackSessionLifecycleEventReady) {
172-
_playbackSession = session;
173+
return;
174+
}
175+
_playbackSession = session;
176+
if (lifecycleEvent.eventType == kBCOVPlaybackSessionLifecycleEventReady) {
173177
[self refreshVolume];
174178
[self refreshBitRate];
175179
if (self.onReady) {

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-brightcove-player",
3-
"version": "1.6.6",
3+
"version": "1.6.7",
44
"description": "A React Native implementation of Brightcove Player SDK.",
55
"main": "index.js",
66
"repository": {

0 commit comments

Comments
 (0)