|
@@ -12,34 +12,80 @@ $(document).ready(function() {
|
|
|
const desktopUrl = JSON.parse(dataList).shareTask.desktopUrl;
|
|
|
const title = JSON.parse(dataList).shareTask.title;
|
|
|
const shareJoinUserId = JSON.parse(dataList).shareJoinUser.id;
|
|
|
- $('.title').html(title)
|
|
|
- let bigVideo = new ChimeePlayer({
|
|
|
- wrapper: '#bigVideo', // video dom容器
|
|
|
- src: boardUrl,
|
|
|
- box: 'hls',
|
|
|
- isLive: true,
|
|
|
- autoplay: true,
|
|
|
- muted: false
|
|
|
+ $('.title p').html(title)
|
|
|
+ /**
|
|
|
+ * chimeeplayer播放器
|
|
|
+ */
|
|
|
+ // let bigVideo = new ChimeePlayer({
|
|
|
+ // wrapper: '#bigVideo', // video dom容器
|
|
|
+ // src: 'http://live.ai160.com/SCREEN/SCREEN1559033120490640.flv',
|
|
|
+ // box: 'flv',
|
|
|
+ // isLive: true,
|
|
|
+ // autoplay: true,
|
|
|
+ // muted: false
|
|
|
+ // });
|
|
|
+ // let smallVideo = new ChimeePlayer({
|
|
|
+ // wrapper: '#smallVideo', // video dom容器
|
|
|
+ // src: 'http://live.ai160.com/SCREEN/SCREEN1559033120490640.flv',
|
|
|
+ // box: 'flv',
|
|
|
+ // isLive: true,
|
|
|
+ // autoplay: true,
|
|
|
+ // muted: true
|
|
|
+ // });
|
|
|
+ let bigVideo = new FlvJsPlayer({
|
|
|
+ "id": "bigVideo",
|
|
|
+ "url": desktopUrl,
|
|
|
+ "playsinline": false,
|
|
|
+ "volume": 1,
|
|
|
+ "autoplay": true,
|
|
|
+ "width": "100%",
|
|
|
+ "height": "714",
|
|
|
+ "ignores": ['definition', 'i18n', 'play', 'replay', 'progress', 'start', 'volume'],
|
|
|
+ "closeVideoClick": true,
|
|
|
+ "closeVideoTouch": true,
|
|
|
+ "keyShortcut": "off",
|
|
|
+ "cssFullscreen": true
|
|
|
});
|
|
|
- let smallVideo = new ChimeePlayer({
|
|
|
- wrapper: '#smallVideo', // video dom容器
|
|
|
- src: desktopUrl,
|
|
|
- box: 'hls',
|
|
|
- isLive: true,
|
|
|
- autoplay: true,
|
|
|
- muted: true
|
|
|
+ let smallVideo = new FlvJsPlayer({
|
|
|
+ "id": "smallVideo",
|
|
|
+ "url": boardUrl,
|
|
|
+ "playsinline": false,
|
|
|
+ "volume": 1,
|
|
|
+ "autoplay": true,
|
|
|
+ "width": "100%",
|
|
|
+ "height": "714",
|
|
|
+ "ignores": ['definition', 'i18n', 'play', 'replay', 'progress', 'start', 'volume'],
|
|
|
+ "closeVideoClick": true,
|
|
|
+ "closeVideoTouch": true,
|
|
|
+ "keyShortcut": "off",
|
|
|
+ "cssFullscreen": true
|
|
|
});
|
|
|
- $('#smallVideo').click(function () {
|
|
|
- $('#bigVideo').removeClass('big-video').addClass('small-video');
|
|
|
- $('#smallVideo').removeClass('small-video').addClass('big-video');
|
|
|
- smallVideo.muted = false;
|
|
|
- bigVideo.muted = true;
|
|
|
- })
|
|
|
- $('#bigVideo').click(function () {
|
|
|
- $('#bigVideo').removeClass('small-video').addClass('big-video');
|
|
|
- $('#smallVideo').removeClass('big-video').addClass('small-video');
|
|
|
- smallVideo.muted = true;
|
|
|
- bigVideo.muted = false;
|
|
|
+ $('#smallVideo').hide();
|
|
|
+ // $('#smallVideo').click(function () {
|
|
|
+ // $('#bigVideo').removeClass('big-video').addClass('small-video');
|
|
|
+ // $('#smallVideo').removeClass('small-video').addClass('big-video');
|
|
|
+ // smallVideo.muted = false;
|
|
|
+ // bigVideo.muted = true;
|
|
|
+ // })
|
|
|
+ // $('#bigVideo').click(function () {
|
|
|
+ // $('#bigVideo').removeClass('small-video').addClass('big-video');
|
|
|
+ // $('#smallVideo').removeClass('big-video').addClass('small-video');
|
|
|
+ // smallVideo.muted = true;
|
|
|
+ // bigVideo.muted = false;
|
|
|
+ // })
|
|
|
+ console.log(smallVideo)
|
|
|
+ $('input:radio').click(function () {
|
|
|
+ // console.log($(this).val())
|
|
|
+ const type = $(this).val();
|
|
|
+ if (type == 'desktopUrl') {
|
|
|
+ $('#bigVideo').show();
|
|
|
+ $('#smallVideo').hide();
|
|
|
+ } else {
|
|
|
+ $('#bigVideo').hide();
|
|
|
+ $('#smallVideo').show();
|
|
|
+ }
|
|
|
+ // player.flvOpts.url = 'http://aldirect.flv.huya.com/huyalive/94525224-2460686034-10568566041753944064-2789274542-10057-A-0-1.flv?wsSecret=a90ccc2ccf9420344d388def9c190893&wsTime=5ced08e1&ratio=500'
|
|
|
+ // console.log(player.config.url)
|
|
|
})
|
|
|
// 判断用户是否存在回调
|
|
|
function shareJoin () {
|