|
@@ -1,282 +1,3 @@
|
|
|
-<!--S-视频-->
|
|
|
-<style>
|
|
|
- .fullscreenvideo {
|
|
|
- position: absolute;
|
|
|
- top: 50%;
|
|
|
- left: 50%;
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- z-index: 99999999;
|
|
|
- background: url('{{Msg "seo" "cdn"}}/images/mp4/start.jpg') no-repeat center center;
|
|
|
- background-color: black;
|
|
|
- -webkit-transform: translateX(-50%) translateY(-50%);
|
|
|
- transform: translateX(-50%) translateY(-50%);
|
|
|
- -webkit-transition: 1s opacity;
|
|
|
- transition: 1s opacity;
|
|
|
- }
|
|
|
- .videocontainer{
|
|
|
- position: fixed;
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- overflow: hidden;
|
|
|
- z-index: 99999999;
|
|
|
- }
|
|
|
- .videocontainer:before{
|
|
|
- content: "";
|
|
|
- position: absolute;
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- display: block;
|
|
|
- z-index: 99999999;
|
|
|
- top: 0;
|
|
|
- left: 0;
|
|
|
- background: rgba(25,29,34,.65);
|
|
|
- }
|
|
|
- .full-video-mask-video-box {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- top: 0;
|
|
|
- left: 0;
|
|
|
- position: absolute;
|
|
|
- z-index: 99999999;
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- display: none;
|
|
|
- background-color: rgba(0, 0, 0, 0.75);
|
|
|
- }
|
|
|
- #rePalyFullVideo, #goFullVideoInfo {
|
|
|
- font-size: 18px;
|
|
|
- line-height: 52px;
|
|
|
- text-align: center;
|
|
|
- margin: 10px 20px;
|
|
|
- border: 1px solid #FFFFFF;
|
|
|
- width: 136px;
|
|
|
- height: 52px;
|
|
|
- box-sizing: border-box;
|
|
|
- border-radius: 34px;
|
|
|
- color: #fff;
|
|
|
- cursor: pointer;
|
|
|
- display: inline-block;
|
|
|
- }
|
|
|
- #goFullVideoInfo {
|
|
|
- border: 1px solid #2CB7CA;
|
|
|
- background-color: #2CB7CA;
|
|
|
- }
|
|
|
- @keyframes rotate-music {
|
|
|
- 0% {
|
|
|
- transform: rotate(0deg);
|
|
|
- }
|
|
|
- 100% {
|
|
|
- transform: rotate(1turn);
|
|
|
- }
|
|
|
- }
|
|
|
- #music-control-box,
|
|
|
- #skip-video-box {
|
|
|
- position: fixed;
|
|
|
- overflow: hidden;
|
|
|
- z-index: 999999999;
|
|
|
- right: 0;
|
|
|
- top: 0;
|
|
|
- padding: 20px;
|
|
|
- cursor: pointer;
|
|
|
- }
|
|
|
- #skip-video-box {
|
|
|
- right: 70px;
|
|
|
- color: #fff;
|
|
|
- font-size: 16px;
|
|
|
- line-height: 30px;
|
|
|
- padding: 20px 8px;
|
|
|
- }
|
|
|
- #music-control-box.run-music .music-icon-box {
|
|
|
- -webkit-animation-play-state: running;
|
|
|
- animation-play-state: running;
|
|
|
- }
|
|
|
- #music-control-box.run-music .music-icon-box::before {
|
|
|
- content: none;
|
|
|
- }
|
|
|
- #music-control-box .music-icon-box {
|
|
|
- position: relative;
|
|
|
- width: 30px;
|
|
|
- height: 30px;
|
|
|
- border-radius: 50%;
|
|
|
- border: 1px solid #fff;
|
|
|
- box-sizing: border-box;
|
|
|
- overflow: hidden;
|
|
|
- background-color: rgba(0, 0, 0, 0.6);
|
|
|
- -webkit-animation: rotate-music 3s linear infinite;
|
|
|
- animation: rotate-music 3s linear infinite;
|
|
|
- -webkit-animation-play-state: paused;
|
|
|
- animation-play-state: paused;
|
|
|
- }
|
|
|
- #music-control-box .music-icon-box::before {
|
|
|
- content: '';
|
|
|
- width: 16px;
|
|
|
- height: 2px;
|
|
|
- background: #fff;
|
|
|
- position: absolute;
|
|
|
- top: 12px;
|
|
|
- left: 6px;
|
|
|
- transform: rotate(45deg);
|
|
|
- }
|
|
|
- #music-control-box .music-icon-box img {
|
|
|
- width: 18px;
|
|
|
- height: 18px;
|
|
|
- margin: 5px;
|
|
|
- }
|
|
|
-</style>
|
|
|
-<div class="videocontainer" id="FullVideo">
|
|
|
- <div id="music-control-box">
|
|
|
- <div class="music-icon-box">
|
|
|
- <img src='{{Msg "seo" "cdn"}}/images/mp4/music-icon.png' />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div id="skip-video-box">跳过</div>
|
|
|
- <video id="bgvid" class="fullscreenvideo" poster='{{Msg "seo" "cdn"}}/images/mp4/start.jpg'
|
|
|
- muted preload="auto"
|
|
|
- playsinline="true" webkit-playsinline="true" mtt-playsinline="true"
|
|
|
- x5-video-player-type="h5-page"
|
|
|
- autoplay="true" >
|
|
|
- <source src='{{Msg "seo" "cdn"}}/images/mp4/start_hd.mp4' type="video/mp4">
|
|
|
- </video>
|
|
|
- <div class="full-video-mask-video-box">
|
|
|
- <div class="full-video-button">
|
|
|
- <div id="rePalyFullVideo">再次播放</div>
|
|
|
- <div id="goFullVideoInfo">查看详情</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-</div>
|
|
|
-<script>
|
|
|
- var jyTempLog = window.console.log
|
|
|
- if (window.localStorage.getItem('log') === '1') {
|
|
|
- window.console.log = jyTempLog
|
|
|
- } else {
|
|
|
- window.console.log = function () {
|
|
|
- return null
|
|
|
- }
|
|
|
- }
|
|
|
- function getCookieValue(name) {
|
|
|
- var result = document.cookie.match("(^|[^;]+)\\s*" + name + "\\s*=\\s*([^;]+)")
|
|
|
- return result ? result.pop() : ""
|
|
|
- }
|
|
|
- try {
|
|
|
- window.onlyUserID = {{session "userId"}}
|
|
|
- if (location.pathname === '/' || location.pathname === '' || location.pathname.indexOf('article/content/') !== -1 || location.pathname.indexOf('article/mailprivate/') !== -1) {
|
|
|
- // 首页userId有redis缓存,采用cookie判断
|
|
|
- window.onlyUserID = getCookieValue('SESSIONID')
|
|
|
- }
|
|
|
- } catch (e) {
|
|
|
- console.log('获取ID失败')
|
|
|
- }
|
|
|
- function setOnlyCookie () {
|
|
|
- try {
|
|
|
- var oCookie = window.onlyUserID || null
|
|
|
- var readUserID = JSON.parse(localStorage.getItem('big_member_full_video_play_reads') || '[]')
|
|
|
- if (readUserID.indexOf(oCookie) === -1) {
|
|
|
- readUserID.push(oCookie)
|
|
|
- }
|
|
|
- if (readUserID.indexOf(getCookieValue('SESSIONID')) === -1) {
|
|
|
- readUserID.push(getCookieValue('SESSIONID'))
|
|
|
- }
|
|
|
- localStorage.setItem('big_member_full_video_play_reads', JSON.stringify(readUserID))
|
|
|
- } catch (e) {
|
|
|
- console.log('cookie 获取失败01')
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- function clearOtherUserLocalStorage () {
|
|
|
- var readUserID = JSON.parse(localStorage.getItem('big_member_full_video_play_reads') || '[]')
|
|
|
- if (readUserID.length) {
|
|
|
- try {
|
|
|
- var oCookie = window.onlyUserID || null
|
|
|
- var isUserNext = readUserID.indexOf(oCookie) === -1
|
|
|
- if (isUserNext) {
|
|
|
- localStorage.removeItem('big_member_full_video_play')
|
|
|
- } else {
|
|
|
- localStorage.setItem('big_member_full_video_play', 'true')
|
|
|
- }
|
|
|
- } catch (e) {
|
|
|
- console.log('cookie 获取失败02')
|
|
|
- }
|
|
|
- } else {
|
|
|
- localStorage.removeItem('big_member_full_video_play')
|
|
|
- }
|
|
|
- }
|
|
|
- if (document.referrer === location.origin || document.referrer === location.origin + '/') {
|
|
|
- if (localStorage.getItem('big_member_full_video_play')) {
|
|
|
- setOnlyCookie()
|
|
|
- }
|
|
|
- }
|
|
|
- function checkSkipPages () {
|
|
|
- var skipPages = ['/big/page/index?source=baidusem', '/front/structed/pc_index.html?source=baidusem']
|
|
|
- return skipPages.some(function (v) {
|
|
|
- return location.href.indexOf(v) !== -1
|
|
|
- })
|
|
|
- }
|
|
|
-
|
|
|
- clearOtherUserLocalStorage()
|
|
|
- var isAutoPlayMusic = false
|
|
|
- if (checkSkipPages()) {
|
|
|
- $("#FullVideo").remove()
|
|
|
- } else if (localStorage.getItem('big_member_full_video_play')) {
|
|
|
- $("#FullVideo").remove()
|
|
|
- } else {
|
|
|
- var bgvid = document.getElementById("bgvid");
|
|
|
- var b_re = document.getElementById('rePalyFullVideo')
|
|
|
- var b_info = document.getElementById('goFullVideoInfo')
|
|
|
- var b_music = document.getElementById('music-control-box')
|
|
|
- var fullbox = document.getElementById("FullVideo");
|
|
|
- var skipVideo = document.getElementById("skip-video-box");
|
|
|
- fullbox.addEventListener('mousedown', function(){
|
|
|
- if (isAutoPlayMusic) {
|
|
|
- isAutoPlayMusic = false
|
|
|
- bgvid.muted = false
|
|
|
- b_music.classList.add('run-music')
|
|
|
- }
|
|
|
- }, false);
|
|
|
- b_music.addEventListener('click', function (e) {
|
|
|
- if (b_music.classList.contains('run-music')) {
|
|
|
- bgvid.muted = true
|
|
|
- b_music.classList.remove('run-music')
|
|
|
- } else {
|
|
|
- bgvid.muted = false
|
|
|
- b_music.classList.add('run-music')
|
|
|
- }
|
|
|
- })
|
|
|
- b_re.addEventListener('click', function () {
|
|
|
- bgvid.play()
|
|
|
- document.querySelector('.full-video-mask-video-box').style.display = 'none'
|
|
|
- })
|
|
|
- skipVideo.addEventListener('click', function () {
|
|
|
- $("#FullVideo").remove()
|
|
|
- localStorage.setItem('big_member_full_video_play', 'true')
|
|
|
- setOnlyCookie()
|
|
|
- })
|
|
|
- b_info.addEventListener('click', function () {
|
|
|
- location.href = '/big/page/index'
|
|
|
- })
|
|
|
- bgvid.addEventListener('play', function () { //播放开始执行的函数
|
|
|
- console.log("开始播放");
|
|
|
- b_music.style.display = 'block'
|
|
|
- skipVideo.style.display = 'block'
|
|
|
- });
|
|
|
- bgvid.addEventListener('pause', function () { //暂停开始执行的函数
|
|
|
- console.log("暂停播放");
|
|
|
- });
|
|
|
- bgvid.addEventListener('waiting', function () { //加载
|
|
|
- console.log("加载中");
|
|
|
- });
|
|
|
- bgvid.addEventListener('ended', function () { //结束
|
|
|
- console.log("播放结束");
|
|
|
- document.querySelector('.full-video-mask-video-box').style.display = 'flex'
|
|
|
- b_music.style.display = 'none'
|
|
|
- skipVideo.style.display = 'none'
|
|
|
- localStorage.setItem('big_member_full_video_play', 'true')
|
|
|
- setOnlyCookie()
|
|
|
- }, false);
|
|
|
- }
|
|
|
-</script>
|
|
|
-<!--E-视频-->
|
|
|
<style>
|
|
|
.new-info {
|
|
|
position: relative;
|