Skip to content

Commit

Permalink
Update vod previw url fun
Browse files Browse the repository at this point in the history
  • Loading branch information
fgl27 committed Aug 3, 2022
1 parent bc6409b commit a39a483
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions app/specific/PlayVod.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ function PlayVod_Start() {
function PlayVod_SetStart() {
PlayVod_muted_segments_value = null;
PlayVod_previews_clear();
PlayVod_get_preview_Url();

PlayVod_updateStreamLogo();
PlayVod_updateChapters();
Expand Down Expand Up @@ -303,8 +304,6 @@ function PlayVod_updateVodInfoPannel(response, key, ID) {

Play_CheckFollow(Main_values.Main_selectedChannel_id);

//TODO update this
PlayVod_previews_pre_start(null);
PlayVod_muted_segments_value = response.muted_segments;
PlayVod_muted_segments(PlayVod_muted_segments_value);

Expand Down Expand Up @@ -1357,6 +1356,33 @@ function PlayVod_FastBackForward(position) {
PlayVod_setHidePanel();
}

var previewUrl = '{"query":"{video(id:%x){seekPreviewsURL}}"}';

function PlayVod_get_preview_Url() {
FullxmlHttpGet(
PlayClip_BaseUrl,
Play_base_backup_headers_Array,
PlayVod_get_preview_UrlResult,
noop_fun,
0,
PlayClip_loadVodOffsetStartVodId,
'POST', //Method, null for get
previewUrl.replace('%x', Main_values.ChannelVod_vodId)
);
}

function PlayVod_get_preview_UrlResult(responseObj) {
if (PlayVod_isOn) {
if (responseObj.status === 200) {
var obj = JSON.parse(responseObj.responseText);

if (obj.data && obj.data.video && obj.data.video.seekPreviewsURL) {
PlayVod_previews_pre_start(obj.data.video.seekPreviewsURL);
}
}
}
}

var PlayVod_previews_url;
var PlayVod_previewsId;

Expand Down

0 comments on commit a39a483

Please sign in to comment.