51 lines
1.7 KiB
TypeScript
51 lines
1.7 KiB
TypeScript
// import { ref, nextTick, onBeforeUnmount} from 'vue';
|
|
|
|
// export const rtcServerUrl = import.meta.env.VITE_GLOB_RTC_SERVER;
|
|
|
|
export function getDefOptions(object) {
|
|
// const windowObj = <any>window;
|
|
// const WebRtcStreamer = windowObj.WebRtcStreamer;
|
|
let o = {
|
|
autoplay: false,
|
|
controls: true,
|
|
muted: true,
|
|
errorDisplay: false,
|
|
preload: 'auto',
|
|
language: 'zh-CN',
|
|
aspectRatio: "16:9",
|
|
fluid: true,
|
|
liveui: true,
|
|
hotkeys: false,
|
|
caches: true,
|
|
// playbackRates: [1,2,3,4,5,8,10,20],
|
|
trechIrder: ['flash'],
|
|
// controlBar: {
|
|
// children: ['FastReplayButton', 'playToggle', 'FastForwardButton', 'volumePanel', 'currentTimeDisplay', 'timeDivider', 'durationDisplay', 'progressControl', 'liveDisplay', 'seekToLive', 'remainingTimeDisplay', 'customControlSpacer', 'playbackRateMenuButton', 'chaptersButton', 'descriptionsButton', 'subsCapsButton', 'audioTrackButton', 'fullscreenToggle']
|
|
// ,
|
|
/*children: [
|
|
"iconPreviousItem",
|
|
"Button",
|
|
"playToggle", // 播放暂停
|
|
"volumePanel", // 音量
|
|
"volumeMenuButton",
|
|
"durationDisplay",
|
|
"timeDivider",
|
|
"currentTimeDisplay",
|
|
"progressControl",
|
|
"remainingTimeDisplay",
|
|
"fullscreenToggle", // 全屏
|
|
],*/
|
|
// },
|
|
// sources: [{
|
|
// // type: 'rtmp/flv',
|
|
// // src: 'rtmp://127.0.0.1:1935/live/soures',
|
|
// type: 'application/x-mpegURL',
|
|
// src: 'http://127.0.0.1/live_hls/soures.m3u8',
|
|
// }],
|
|
flash: {
|
|
swf: 'https://cnd.bootcdn.net/ajax/libs/videojs-swf/5.4.2/video-js.swf',
|
|
}
|
|
};
|
|
return Object.assign(o,object);
|
|
}
|