Skip to content

Commit

Permalink
Update API docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jellyfin-bot committed Nov 20, 2024
1 parent e9deedf commit c764252
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 19 deletions.
5 changes: 3 additions & 2 deletions docs/api/components_ItemGrid_LoadVideoContentTask.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
forceTranscoding = false

m.top.content = [LoadItems_VideoPlayer(id, mediaSourceId, audio_stream_idx, forceTranscoding)]
m.top.forceMp3 = false
end sub

function LoadItems_VideoPlayer(id as string, mediaSourceId = invalid as dynamic, audio_stream_idx = 1 as integer, forceTranscoding = false as boolean) as dynamic
Expand Down Expand Up @@ -174,7 +175,7 @@
if not isValid(mediaSourceId) then mediaSourceId = video.id
if meta.live then mediaSourceId = ""

m.playbackInfo = ItemPostPlaybackInfo(video.id, mediaSourceId, audio_stream_idx, subtitle_idx, playbackPosition)
m.playbackInfo = ItemPostPlaybackInfo(video.id, mediaSourceId, audio_stream_idx, subtitle_idx, playbackPosition, m.top.forceMp3)
if not isValid(m.playbackInfo)
video.errorMsg = "Error loading playback info"
video.content = invalid
Expand All @@ -191,7 +192,7 @@
video.SelectedSubtitle = defaultSubtitleIndex
subtitle_idx = defaultSubtitleIndex

m.playbackInfo = ItemPostPlaybackInfo(video.id, mediaSourceId, audio_stream_idx, subtitle_idx, playbackPosition)
m.playbackInfo = ItemPostPlaybackInfo(video.id, mediaSourceId, audio_stream_idx, subtitle_idx, playbackPosition, m.top.forceMp3)
if not isValid(m.playbackInfo)
video.errorMsg = "Error loading playback info"
video.content = invalid
Expand Down
14 changes: 13 additions & 1 deletion docs/api/components_video_VideoPlayerView.bs.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

m.playbackTimer = m.top.findNode("playbackTimer")
m.bufferCheckTimer = m.top.findNode("bufferCheckTimer")
m.top.observeField("state", "onState")
m.top.observeField("content", "onContentChange")
m.top.observeField("selectedSubtitle", "onSubtitleChange")
m.top.observeField("audioIndex", "onAudioIndexChange")
Expand Down Expand Up @@ -399,6 +398,8 @@
return
end if

m.top.observeField("state", "onState")

m.top.content = videoContent[0].content
m.top.PlaySessionId = videoContent[0].PlaySessionId
m.top.videoId = videoContent[0].id
Expand Down Expand Up @@ -641,6 +642,17 @@

if not m.playReported and m.top.transcodeAvailable
m.top.retryWithTranscoding = true ' If playback was not reported, retry with transcoding
else if m.top.errorStr = "decoder:pump:Unsupported AAC stream."
m.log.info("retrying video with mp3 audio stream", m.currentItem.id, m.top.SelectedSubtitle, m.top.audioIndex)

m.top.unobserveField("state")
m.LoadMetaDataTask.forceMp3 = true
m.LoadMetaDataTask.selectedSubtitleIndex = m.top.SelectedSubtitle
m.LoadMetaDataTask.selectedAudioStreamIndex = m.top.audioIndex
m.LoadMetaDataTask.itemId = m.currentItem.id
m.LoadMetaDataTask.observeField("content", "onVideoContentLoaded")

m.LoadMetaDataTask.control = "RUN"
else
' If an error was encountered, Display dialog
showPlaybackErrorDialog(tr("Error During Playback"))
Expand Down
2 changes: 1 addition & 1 deletion docs/api/data/search.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/api/module-Items.html

Large diffs are not rendered by default.

Loading

0 comments on commit c764252

Please sign in to comment.