Revert "Pass the title and channel name to Chromecast."

This reverts commit bb828385d0.
This commit is contained in:
Sean Yesmunt 2021-01-20 15:10:16 -05:00
parent 6ed103b33f
commit c166060f0d
2 changed files with 4 additions and 9 deletions

View file

@ -46,7 +46,6 @@ export type Player = {
type Props = {
source: string,
claim: StreamClaim,
sourceType: string,
poster: ?string,
onPlayerReady: Player => void,
@ -161,16 +160,13 @@ class ChromecastWrapper {
/**
* Actions that need to happen before initializing 'videojs'.
*/
static preInit(videojs, options, claim) {
static preInit(videojs, options, title) {
const additionalOptions = {
// @if TARGET='web'
techOrder: ['chromecast', 'html5'],
chromecast: {
requestTitleFn: function(src) {
return claim && claim.value && claim.value.title ? claim.value.title : '';
},
requestSubtitleFn: function(src) {
return claim && claim.signing_channel && claim.signing_channel.name ? claim.signing_channel.name : '';
return '';
},
},
// @endif
@ -207,7 +203,7 @@ class ChromecastWrapper {
properties for this component should be kept to ONLY those that if changed should REQUIRE an entirely new videojs element
*/
export default React.memo<Props>(function VideoJs(props: Props) {
const { startMuted, source, claim, sourceType, poster, isAudio, onPlayerReady } = props;
const { startMuted, source, sourceType, poster, isAudio, onPlayerReady } = props;
const [reload, setReload] = useState('initial');
let player: ?Player;
@ -387,7 +383,7 @@ export default React.memo<Props>(function VideoJs(props: Props) {
videoJsOptions.sources[0].type = 'application/x-mpegURL';
}
videoJsOptions = ChromecastWrapper.preInit(videojs, videoJsOptions, claim);
videoJsOptions = ChromecastWrapper.preInit(videojs, videoJsOptions);
player = videojs(el, videoJsOptions, () => {
if (player) {

View file

@ -220,7 +220,6 @@ function VideoViewer(props: Props) {
{isLoading && <LoadingScreen status={__('Loading')} />}
<VideoJs
source={source}
claim={claim}
isAudio={isAudio}
poster={isAudio || (embedded && !autoplayIfEmbedded) ? thumbnail : null}
sourceType={forcePlayer ? 'video/mp4' : contentType}