home page news removed
This commit is contained in:
parent
515e0328db
commit
5efbf92b3b
|
|
@ -83,3 +83,170 @@
|
|||
</div>
|
||||
|
||||
@endsection
|
||||
@section('after_scripts')
|
||||
<script>
|
||||
var urlq = new URL(window.location.href);
|
||||
var query_string = urlq.search;
|
||||
var search_params = new URLSearchParams(query_string);
|
||||
var c = search_params.get('from');
|
||||
|
||||
if(!c){
|
||||
c = 1
|
||||
}else{
|
||||
c
|
||||
}
|
||||
|
||||
|
||||
var video_source = 'https://alpha.tv.online.tm/legacyhls/ch00'+ c +'.m3u8';
|
||||
if(Hls.isSupported()) {
|
||||
var video = document.getElementById('webtv-video');
|
||||
var hls = new Hls();
|
||||
hls.loadSource(video_source);
|
||||
hls.attachMedia(video);
|
||||
hls.on(Hls.Events.MANIFEST_PARSED,function() {
|
||||
video.play();
|
||||
});
|
||||
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
||||
video.src = video_source;
|
||||
video.addEventListener('canplay',function() {
|
||||
video.play();
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
function setupVar1(){
|
||||
|
||||
var video_source = 'https://alpha.tv.online.tm/legacyhls/ch001.m3u8';
|
||||
|
||||
if(Hls.isSupported()) {
|
||||
var video = document.getElementById('webtv-video');
|
||||
var hls = new Hls();
|
||||
hls.loadSource(video_source);
|
||||
hls.attachMedia(video);
|
||||
hls.on(Hls.Events.MANIFEST_PARSED,function() {
|
||||
video.play();
|
||||
});
|
||||
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
||||
video.src = video_source;
|
||||
video.addEventListener('canplay',function() {
|
||||
video.play();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function setupVar2(){
|
||||
var video_source = 'https://alpha.tv.online.tm/legacyhls/ch002.m3u8';
|
||||
|
||||
if(Hls.isSupported()) {
|
||||
var video = document.getElementById('webtv-video');
|
||||
var hls = new Hls();
|
||||
hls.loadSource(video_source);
|
||||
hls.attachMedia(video);
|
||||
hls.on(Hls.Events.MANIFEST_PARSED,function() {
|
||||
video.play();
|
||||
});
|
||||
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
||||
video.src = video_source;
|
||||
video.addEventListener('canplay',function() {
|
||||
video.play();
|
||||
});
|
||||
}
|
||||
}
|
||||
function setupVar3(){
|
||||
var video_source = 'https://alpha.tv.online.tm/legacyhls/ch003.m3u8';
|
||||
|
||||
if(Hls.isSupported()) {
|
||||
var video = document.getElementById('webtv-video');
|
||||
var hls = new Hls();
|
||||
hls.loadSource(video_source);
|
||||
hls.attachMedia(video);
|
||||
hls.on(Hls.Events.MANIFEST_PARSED,function() {
|
||||
video.play();
|
||||
});
|
||||
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
||||
video.src = video_source;
|
||||
video.addEventListener('canplay',function() {
|
||||
video.play();
|
||||
});
|
||||
}
|
||||
}
|
||||
function setupVar4(){
|
||||
var video_source = 'https://alpha.tv.online.tm/legacyhls/ch007.m3u8';
|
||||
|
||||
if(Hls.isSupported()) {
|
||||
var video = document.getElementById('webtv-video');
|
||||
var hls = new Hls();
|
||||
hls.loadSource(video_source);
|
||||
hls.attachMedia(video);
|
||||
hls.on(Hls.Events.MANIFEST_PARSED,function() {
|
||||
video.play();
|
||||
});
|
||||
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
||||
video.src = video_source;
|
||||
video.addEventListener('canplay',function() {
|
||||
video.play();
|
||||
});
|
||||
}
|
||||
}
|
||||
function setupVar5(){
|
||||
var video_source = 'https://alpha.tv.online.tm/legacyhls/ch005.m3u8';
|
||||
|
||||
if(Hls.isSupported()) {
|
||||
var video = document.getElementById('webtv-video');
|
||||
var hls = new Hls();
|
||||
hls.loadSource(video_source);
|
||||
hls.attachMedia(video);
|
||||
hls.on(Hls.Events.MANIFEST_PARSED,function() {
|
||||
video.play();
|
||||
});
|
||||
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
||||
video.src = video_source;
|
||||
video.addEventListener('canplay',function() {
|
||||
video.play();
|
||||
});
|
||||
}
|
||||
}
|
||||
function setupVar6(){
|
||||
var video_source = 'https://alpha.tv.online.tm/legacyhls/ch006.m3u8';
|
||||
|
||||
if(Hls.isSupported()) {
|
||||
var video = document.getElementById('webtv-video');
|
||||
var hls = new Hls();
|
||||
hls.loadSource(video_source);
|
||||
hls.attachMedia(video);
|
||||
hls.on(Hls.Events.MANIFEST_PARSED,function() {
|
||||
video.play();
|
||||
});
|
||||
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
||||
video.src = video_source;
|
||||
video.addEventListener('canplay',function() {
|
||||
video.play();
|
||||
});
|
||||
}
|
||||
}
|
||||
function setupVar7(){
|
||||
var video_source = 'https://alpha.tv.online.tm/legacyhls/ch004.m3u8';
|
||||
|
||||
if(Hls.isSupported()) {
|
||||
var video = document.getElementById('webtv-video');
|
||||
var hls = new Hls();
|
||||
hls.loadSource(video_source);
|
||||
hls.attachMedia(video);
|
||||
hls.on(Hls.Events.MANIFEST_PARSED,function() {
|
||||
video.play();
|
||||
});
|
||||
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
||||
video.src = video_source;
|
||||
video.addEventListener('canplay',function() {
|
||||
video.play();
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
|
|
|
|||
Loading…
Reference in New Issue