whisper.cat/weboasis/tv/cnn/player.min.js

2 lines
1.8 KiB
JavaScript
Raw Normal View History

2023-10-05 23:28:32 +11:00
var video=document.getElementById("video");function playM3u8(a){if(Hls.isSupported()){video.volume=.3;var b=new Hls,c=decodeURIComponent(a);b.loadSource(c),b.attachMedia(video),b.on(Hls.Events.MANIFEST_PARSED,function(){video.play()}),document.title=a}else video.canPlayType("application/vnd.apple.mpegurl")&&(video.src=a,video.addEventListener("canplay",function(){video.play()}),video.volume=.3,document.title=a)}function playPause(){video.paused?video.play():video.pause()}function volumeUp(){.9>=video.volume&&(video.volume+=.1)}function volumeDown(){.1<=video.volume&&(video.volume-=.1)}function seekRight(){video.currentTime+=5}function seekLeft(){video.currentTime-=5}function vidFullscreen(){video.requestFullscreen?video.requestFullscreen():video.mozRequestFullScreen?video.mozRequestFullScreen():video.webkitRequestFullscreen&&video.webkitRequestFullscreen()}playM3u8("https://cors.club/https://service-stitcher.clusters.pluto.tv/stitch/hls/channel/5421f71da6af422839419cb3/master.m3u8?advertisingId=&appName=web&appVersion=5.12.0-a87d76d6acd214757f3f9ce727615cd3be3397a8&app_name=web&clientDeviceType=0&clientID=70dae538-3b60-40aa-a14a-504f073abcf6&clientModelNumber=na&deviceDNT=false&deviceId=70dae538-3b60-40aa-a14a-504f073abcf6&deviceLat=34.0729&deviceLon=-118.2606&deviceMake=Chrome&deviceModel=web&deviceType=web&deviceVersion=87.0.4280.88&marketingRegion=US&serverSideAds=true&sessionID=58fefe78-4853-11eb-ae86-0242ac110002&sid=58fefe78-4853-11eb-ae86-0242ac110002&userId="),$(window).on("load",function(){$("#video").on("click",function(){this.paused?this.play():this.pause()}),Mousetrap.bind("space",playPause),Mousetrap.bind("up",volumeUp),Mousetrap.bind("down",volumeDown),Mousetrap.bind("right",seekRight),Mousetrap.bind("left",seekLeft),Mousetrap.bind("f",vidFullscreen)});