...
|
...
|
@@ -119,13 +119,26 @@ const fetchReplayInfo = (videoID) => { |
|
|
if (result && result.data) {
|
|
|
let d = result.data;
|
|
|
|
|
|
d.logo = helpers.image(d.logo, 70, 70);
|
|
|
d.background = helpers.image(d.background, 640, 968);
|
|
|
d.pic = helpers.image(d.pic, 640, 968);
|
|
|
d.master_pic = helpers.image(d.master_pic, 180, 180);
|
|
|
d.humanTime = _formatTime(data.living_start_time * 1000);
|
|
|
d.video_src = d.url;
|
|
|
|
|
|
let durationH = parseInt(d.live_last_time / 3600, 10); // 1h =3600s
|
|
|
let durationM = parseInt((d.live_last_time - durationH * 3600) / 60, 10);
|
|
|
let duration = [durationH, durationM];
|
|
|
|
|
|
duration.forEach((val, index) => {
|
|
|
if (val < 10) {
|
|
|
duration[index] = `0${val}`;
|
|
|
} else {
|
|
|
duration[index] = '' + val;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// 自定义数据
|
|
|
d.duration = `${duration[0]} : ${duration[1]}`;
|
|
|
d.living = 3; // 重播 状态
|
|
|
d.canPlay = true;
|
|
|
d.atEnd = false;
|
...
|
...
|
@@ -145,13 +158,26 @@ const fetchLiveInfo = (roomID) => { |
|
|
if (result && result.data) {
|
|
|
let d = result.data;
|
|
|
|
|
|
d.logo = helpers.image(d.logo, 70, 70);
|
|
|
d.background_pic = helpers.image(d.background_pic, 640, 968);
|
|
|
d.pic = helpers.image(d.pic, 640, 968);
|
|
|
d.master_pic = helpers.image(d.master_pic, 180, 180);
|
|
|
d.humanTime = _formatTime(d.living_start_time * 1000);
|
|
|
d.video_src = d.hls_downstream_address;
|
|
|
|
|
|
// 自定义的数据
|
|
|
let durationH = parseInt(d.live_last_time / 3600, 10); // 1h =3600s
|
|
|
let durationM = parseInt((d.live_last_time - durationH * 3600) / 60, 10);
|
|
|
let duration = [durationH, durationM];
|
|
|
|
|
|
duration.forEach((val, index) => {
|
|
|
if (val < 10) {
|
|
|
duration[index] = `0${val}`;
|
|
|
} else {
|
|
|
duration[index] = '' + val;
|
|
|
}
|
|
|
});
|
|
|
|
|
|
// 自定义数据
|
|
|
d.duration = `${duration[0]} : ${duration[1]}`;
|
|
|
d.canPlay = d.living === 1;
|
|
|
d.notBegin = d.living === 0;
|
|
|
d.atEnd = d.living === 2;
|
...
|
...
|
|