Skip to content

Commit

Permalink
fix subtitles
Browse files Browse the repository at this point in the history
  • Loading branch information
joelhooks committed Feb 18, 2021
1 parent bcea037 commit 11767d0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/components/EggheadPlayer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export default class EggheadPlayer extends Component {
this.props.height !== nextProps.height ||
this.props.width !== nextProps.width ||
this.props.hidden !== nextProps.hidden ||
this.props.displaySubtitles !== nextProps.displaySubtitles
this.props.displaySubtitles !== nextProps.displaySubtitles ||
this.props.subtitlesUrl !== nextProps.subtitlesUrl
)
}

Expand Down
1 change: 1 addition & 0 deletions src/lib/lessons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ export async function loadBasicLesson(slug: string) {
free_forever
media_url
thumb_url
subtitles_url
path
icon_url
created_at
Expand Down
5 changes: 2 additions & 3 deletions src/pages/lessons/[slug].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import EggheadPlayer, {useEggheadPlayer} from 'components/EggheadPlayer'
import {useEggheadPlayerPrefs} from 'components/EggheadPlayer/use-egghead-player'
import Transcript from 'components/pages/lessons/transcript'
import PlaybackSpeedSelect from 'components/pages/lessons/playback-speed-select'
import {loadBasicLesson, loadLesson, loadLessonForUser} from 'lib/lessons'
import {loadBasicLesson, loadLesson} from 'lib/lessons'
import {useViewer} from 'context/viewer-context'
import {LessonResource} from 'types'
import {NextSeo, VideoJsonLd} from 'next-seo'
Expand All @@ -24,7 +24,6 @@ import RateCourseOverlay from 'components/pages/lessons/overlay/rate-course-over
import axios from 'utils/configured-axios'
import {useEnhancedTranscript} from 'hooks/use-enhanced-transcript'
import useLastResource from 'hooks/use-last-resource'
import getAccessTokenFromCookie from 'utils/get-access-token-from-cookie'
import RecommendNextStepOverlay from 'components/pages/lessons/overlay/recommend-next-step-overlay'
import Markdown from 'react-markdown'
import Link from 'next/link'
Expand Down Expand Up @@ -310,7 +309,7 @@ const Lesson: FunctionComponent<LessonProps> = ({initialLesson}) => {
React.useEffect(() => {
async function run() {
console.debug('loading video with auth')
const loadedLesson = await loadLessonForUser(initialLesson.slug)
const loadedLesson = await loadLesson(initialLesson.slug)
console.debug('authed video loaded', {video: loadedLesson})

send({
Expand Down

0 comments on commit 11767d0

Please sign in to comment.