-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5cc87a2
commit 3268ea9
Showing
6 changed files
with
128 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#cmc_player_video { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
height: 100vh; | ||
width: 100vw; | ||
z-index: 999; | ||
} | ||
.cmc-video { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
height: 100vh; | ||
width: 100vw; | ||
z-index: 999; | ||
} | ||
.cmc-expand { | ||
display: none !important; | ||
} | ||
.course-info__small-screen { | ||
display: none !important; | ||
} | ||
.course-info__note { | ||
display: none !important; | ||
} | ||
.course-info__header { | ||
display: none !important; | ||
} | ||
.feedback-botton-group { | ||
display: none !important; | ||
} | ||
.cmc-control { | ||
position: fixed; | ||
bottom: 0; | ||
left: 0; | ||
height: auto; | ||
width: 100vw; | ||
z-index: 999; | ||
} | ||
.custom-footer { | ||
display: none !important; | ||
} | ||
.cmc-blue { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
height: 100vh; | ||
width: 100vw; | ||
z-index: 999; | ||
/* display:none !important; */ | ||
} | ||
.custom-header__wrapper { | ||
display: none !important; | ||
} | ||
.course-info__main { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
height: 100vh !important; | ||
width: 100vw !important; | ||
z-index: 999; | ||
} | ||
body { | ||
overflow: hidden; | ||
background: black; | ||
} | ||
|
||
.wtf-zykt-button-next { | ||
position: fixed; | ||
right: 10px; | ||
top: 10px; | ||
border-radius: 50%; | ||
width: 80px; | ||
height: 80px; | ||
cursor: pointer; | ||
z-index: 999; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* 文件描述:给智云课堂的播放页面做的修复和优化 | ||
* 为啥做了一次跳转:因为H5跨域资源不能主动下载 | ||
*/ | ||
|
||
const button = document.createElement("button"); | ||
button.className = "wtf-zykt-button-next"; | ||
const host = window.location.host; | ||
const isVideoHost = host === "vod.cmc.zju.edu.cn"; | ||
button.innerHTML = isVideoHost ? "下载" : "前往下载"; | ||
|
||
const downloadVideo = () => { | ||
if (isVideoHost) { | ||
const file_url = window.location.href.split("?")[0]; | ||
const link = document.createElement("a"); | ||
link.href = file_url; | ||
link.download = "video.mp4"; | ||
link.click(); | ||
} else { | ||
const video = document.getElementById("cmc_player_video"); | ||
if (video.src) { | ||
window.location.assign(video.src); | ||
} | ||
} | ||
}; | ||
|
||
button.addEventListener("click", downloadVideo); | ||
|
||
document.body.append(button); |