Loading Video.js +8 −0 Changes for Video.js: 8 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -151,6 +151,12 @@ export default class Video extends Component { } }; _onCaptionsDeviceSetting = (event) => { if (this.props.onCaptionsDeviceSetting) { this.props.onCaptionsDeviceSetting(event.nativeEvent); } }; _onPlaybackStalled = (event) => { if (this.props.onPlaybackStalled) { this.props.onPlaybackStalled(event.nativeEvent); Loading Loading @@ -241,6 +247,7 @@ export default class Video extends Component { onVideoFullscreenPlayerWillDismiss: this._onFullscreenPlayerWillDismiss, onVideoFullscreenPlayerDidDismiss: this._onFullscreenPlayerDidDismiss, onReadyForDisplay: this._onReadyForDisplay, onCaptionsDeviceSetting: this._onCaptionsDeviceSetting, onPlaybackStalled: this._onPlaybackStalled, onPlaybackResume: this._onPlaybackResume, onPlaybackRateChange: this._onPlaybackRateChange, Loading Loading @@ -379,6 +386,7 @@ Video.propTypes = { onFullscreenPlayerWillDismiss: PropTypes.func, onFullscreenPlayerDidDismiss: PropTypes.func, onReadyForDisplay: PropTypes.func, onCaptionsDeviceSetting: PropTypes.func, onPlaybackStalled: PropTypes.func, onPlaybackResume: PropTypes.func, onPlaybackRateChange: PropTypes.func, Loading ios/Video/RCTVideo.h +1 −0 Changes for ios/Video/RCTVideo.h: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ @property (nonatomic, copy) RCTBubblingEventBlock onVideoFullscreenPlayerWillDismiss; @property (nonatomic, copy) RCTBubblingEventBlock onVideoFullscreenPlayerDidDismiss; @property (nonatomic, copy) RCTBubblingEventBlock onReadyForDisplay; @property (nonatomic, copy) RCTBubblingEventBlock onCaptionsDeviceSetting; @property (nonatomic, copy) RCTBubblingEventBlock onPlaybackStalled; @property (nonatomic, copy) RCTBubblingEventBlock onPlaybackResume; @property (nonatomic, copy) RCTBubblingEventBlock onPlaybackRateChange; Loading ios/Video/RCTVideo.m +8 −3 Changes for ios/Video/RCTVideo.m: 8 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ static int const RCTVideoUnset = -1; #if __has_include(<react-native-video/RCTVideoCache.h>) RCTVideoCache * _videoCache; #endif BOOL _deviceCaptionsEnabled; } - (instancetype)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher Loading Loading @@ -364,6 +365,12 @@ static int const RCTVideoUnset = -1; @"target": self.reactTag }); } if (self.onCaptionsDeviceSetting) { self.onCaptionsDeviceSetting(@{@"deviceCaptionsEnabled": [NSNumber numberWithBool:_deviceCaptionsEnabled], @"target": self.reactTag }); } }]; }); _videoLoadStarted = YES; Loading Loading @@ -966,9 +973,7 @@ static int const RCTVideoUnset = -1; // in the situation that a selected text track is not available (eg. specifies a textTrack not available) if (![type isEqualToString:@"disabled"] && selectedTrackIndex == RCTVideoUnset) { CFArrayRef captioningMediaCharacteristics = MACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics(kMACaptionAppearanceDomainUser); NSArray *captionSettings = (__bridge NSArray*)captioningMediaCharacteristics; if ([captionSettings containsObject:AVMediaCharacteristicTranscribesSpokenDialogForAccessibility]) { if (_deviceCaptionsEnabled) { selectedTrackIndex = 0; // If we can't find a match, use the first available track NSString *systemLanguage = [[NSLocale preferredLanguages] firstObject]; for (int i = 0; i < textTracks.count; ++i) { Loading ios/Video/RCTVideoManager.m +1 −0 Changes for ios/Video/RCTVideoManager.m: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ RCT_EXPORT_VIEW_PROPERTY(onVideoFullscreenPlayerDidPresent, RCTBubblingEventBloc RCT_EXPORT_VIEW_PROPERTY(onVideoFullscreenPlayerWillDismiss, RCTBubblingEventBlock); RCT_EXPORT_VIEW_PROPERTY(onVideoFullscreenPlayerDidDismiss, RCTBubblingEventBlock); RCT_EXPORT_VIEW_PROPERTY(onReadyForDisplay, RCTBubblingEventBlock); RCT_EXPORT_VIEW_PROPERTY(onCaptionsDeviceSetting, RCTBubblingEventBlock); RCT_EXPORT_VIEW_PROPERTY(onPlaybackStalled, RCTBubblingEventBlock); RCT_EXPORT_VIEW_PROPERTY(onPlaybackResume, RCTBubblingEventBlock); RCT_EXPORT_VIEW_PROPERTY(onPlaybackRateChange, RCTBubblingEventBlock); Loading Loading
Video.js +8 −0 Changes for Video.js: 8 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -151,6 +151,12 @@ export default class Video extends Component { } }; _onCaptionsDeviceSetting = (event) => { if (this.props.onCaptionsDeviceSetting) { this.props.onCaptionsDeviceSetting(event.nativeEvent); } }; _onPlaybackStalled = (event) => { if (this.props.onPlaybackStalled) { this.props.onPlaybackStalled(event.nativeEvent); Loading Loading @@ -241,6 +247,7 @@ export default class Video extends Component { onVideoFullscreenPlayerWillDismiss: this._onFullscreenPlayerWillDismiss, onVideoFullscreenPlayerDidDismiss: this._onFullscreenPlayerDidDismiss, onReadyForDisplay: this._onReadyForDisplay, onCaptionsDeviceSetting: this._onCaptionsDeviceSetting, onPlaybackStalled: this._onPlaybackStalled, onPlaybackResume: this._onPlaybackResume, onPlaybackRateChange: this._onPlaybackRateChange, Loading Loading @@ -379,6 +386,7 @@ Video.propTypes = { onFullscreenPlayerWillDismiss: PropTypes.func, onFullscreenPlayerDidDismiss: PropTypes.func, onReadyForDisplay: PropTypes.func, onCaptionsDeviceSetting: PropTypes.func, onPlaybackStalled: PropTypes.func, onPlaybackResume: PropTypes.func, onPlaybackRateChange: PropTypes.func, Loading
ios/Video/RCTVideo.h +1 −0 Changes for ios/Video/RCTVideo.h: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ @property (nonatomic, copy) RCTBubblingEventBlock onVideoFullscreenPlayerWillDismiss; @property (nonatomic, copy) RCTBubblingEventBlock onVideoFullscreenPlayerDidDismiss; @property (nonatomic, copy) RCTBubblingEventBlock onReadyForDisplay; @property (nonatomic, copy) RCTBubblingEventBlock onCaptionsDeviceSetting; @property (nonatomic, copy) RCTBubblingEventBlock onPlaybackStalled; @property (nonatomic, copy) RCTBubblingEventBlock onPlaybackResume; @property (nonatomic, copy) RCTBubblingEventBlock onPlaybackRateChange; Loading
ios/Video/RCTVideo.m +8 −3 Changes for ios/Video/RCTVideo.m: 8 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -68,6 +68,7 @@ static int const RCTVideoUnset = -1; #if __has_include(<react-native-video/RCTVideoCache.h>) RCTVideoCache * _videoCache; #endif BOOL _deviceCaptionsEnabled; } - (instancetype)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher Loading Loading @@ -364,6 +365,12 @@ static int const RCTVideoUnset = -1; @"target": self.reactTag }); } if (self.onCaptionsDeviceSetting) { self.onCaptionsDeviceSetting(@{@"deviceCaptionsEnabled": [NSNumber numberWithBool:_deviceCaptionsEnabled], @"target": self.reactTag }); } }]; }); _videoLoadStarted = YES; Loading Loading @@ -966,9 +973,7 @@ static int const RCTVideoUnset = -1; // in the situation that a selected text track is not available (eg. specifies a textTrack not available) if (![type isEqualToString:@"disabled"] && selectedTrackIndex == RCTVideoUnset) { CFArrayRef captioningMediaCharacteristics = MACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics(kMACaptionAppearanceDomainUser); NSArray *captionSettings = (__bridge NSArray*)captioningMediaCharacteristics; if ([captionSettings containsObject:AVMediaCharacteristicTranscribesSpokenDialogForAccessibility]) { if (_deviceCaptionsEnabled) { selectedTrackIndex = 0; // If we can't find a match, use the first available track NSString *systemLanguage = [[NSLocale preferredLanguages] firstObject]; for (int i = 0; i < textTracks.count; ++i) { Loading
ios/Video/RCTVideoManager.m +1 −0 Changes for ios/Video/RCTVideoManager.m: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ RCT_EXPORT_VIEW_PROPERTY(onVideoFullscreenPlayerDidPresent, RCTBubblingEventBloc RCT_EXPORT_VIEW_PROPERTY(onVideoFullscreenPlayerWillDismiss, RCTBubblingEventBlock); RCT_EXPORT_VIEW_PROPERTY(onVideoFullscreenPlayerDidDismiss, RCTBubblingEventBlock); RCT_EXPORT_VIEW_PROPERTY(onReadyForDisplay, RCTBubblingEventBlock); RCT_EXPORT_VIEW_PROPERTY(onCaptionsDeviceSetting, RCTBubblingEventBlock); RCT_EXPORT_VIEW_PROPERTY(onPlaybackStalled, RCTBubblingEventBlock); RCT_EXPORT_VIEW_PROPERTY(onPlaybackResume, RCTBubblingEventBlock); RCT_EXPORT_VIEW_PROPERTY(onPlaybackRateChange, RCTBubblingEventBlock); Loading