diff --git a/__tests__/src/components/AudioViewer.test.js b/__tests__/src/components/AudioViewer.test.js index ecaf18ac54b2a14111538d65f182606780f04600..cca67ee5dd9f4f10729c6a0a0dc955795025dadc 100644 --- a/__tests__/src/components/AudioViewer.test.js +++ b/__tests__/src/components/AudioViewer.test.js @@ -40,8 +40,8 @@ describe('AudioViewer', () => { { getFormat: () => 'video/mp4', id: 1 }, ], captions: [ - { getLabel: () => 'English', getProperty: () => 'en', id: 1 }, - { getLabel: () => 'French', getProperty: () => 'fr', id: 2 }, + { getDefaultLabel: () => 'English', getProperty: () => 'en', id: 1 }, + { getDefaultLabel: () => 'French', getProperty: () => 'fr', id: 2 }, ], }, true); expect(wrapper.contains(<track src={1} label="English" srcLang="en" />)).toBe(true); diff --git a/__tests__/src/components/VideoViewer.test.js b/__tests__/src/components/VideoViewer.test.js index 99e229393b995bcfb68359fc684ab4b1412cf515..7b3521c08ac2bff116aff550356b69d5c3710bb7 100644 --- a/__tests__/src/components/VideoViewer.test.js +++ b/__tests__/src/components/VideoViewer.test.js @@ -37,8 +37,8 @@ describe('VideoViewer', () => { it('captions', () => { wrapper = createWrapper({ captions: [ - { getLabel: () => 'English', getProperty: () => 'en', id: 1 }, - { getLabel: () => 'French', getProperty: () => 'fr', id: 2 }, + { getDefaultLabel: () => 'English', getProperty: () => 'en', id: 1 }, + { getDefaultLabel: () => 'French', getProperty: () => 'fr', id: 2 }, ], videoResources: [ { getFormat: () => 'video/mp4', id: 1 }, diff --git a/src/components/AudioViewer.js b/src/components/AudioViewer.js index 5d80e059cf8ddb6fba46fbc70a9dbb966ab8388f..9c7523db56d31bb46b12858a198e93ea8a46c8d1 100644 --- a/src/components/AudioViewer.js +++ b/src/components/AudioViewer.js @@ -20,7 +20,7 @@ export class AudioViewer extends Component { ))} {captions.map(caption => ( <Fragment key={caption.id}> - <track src={caption.id} label={caption.getLabel()} srcLang={caption.getProperty('language')} /> + <track src={caption.id} label={caption.getDefaultLabel()} srcLang={caption.getProperty('language')} /> </Fragment> ))} </audio> diff --git a/src/components/VideoViewer.js b/src/components/VideoViewer.js index be9e8ab4664d33dd287d22d7873cf2613da5b539..2e6ab498e6bb5aad38f2d5d9b4c4a7d96dfcffa8 100644 --- a/src/components/VideoViewer.js +++ b/src/components/VideoViewer.js @@ -19,7 +19,7 @@ export class VideoViewer extends Component { ))} {captions.map(caption => ( <Fragment key={caption.id}> - <track src={caption.id} label={caption.getLabel()} srcLang={caption.getProperty('language')} /> + <track src={caption.id} label={caption.getDefaultLabel()} srcLang={caption.getProperty('language')} /> </Fragment> ))} </video>