rebuilding site Thu Oct 1 02:06:59 PM CST 2020

This commit is contained in:
James Feng Cao 2020-10-01 14:07:00 +08:00
parent 9a6e3cee7f
commit fecb1941e2
2 changed files with 39 additions and 4 deletions

View file

@ -112,6 +112,10 @@
<a href="i:00化学品:http://www.basechem.org/search?q=">化学品:http://www.basechem.org/search?q=</a><br> <a href="i:00化学品:http://www.basechem.org/search?q=">化学品:http://www.basechem.org/search?q=</a><br>
<a href="i:00britannica:https://www.britannica.com/search?query=">britannica:https://www.britannica.com/search?query=</a><br> <a href="i:00britannica:https://www.britannica.com/search?query=">britannica:https://www.britannica.com/search?query=</a><br>
<a href="i:00mathRef:https://reference.wolfram.com/search/?q=">mathRef:https://reference.wolfram.com/search/?q=</a><br> <a href="i:00mathRef:https://reference.wolfram.com/search/?q=">mathRef:https://reference.wolfram.com/search/?q=</a><br>
<a href="i:00mathSE:https://math.stackexchange.com/search?q=">mathSE:https://math.stackexchange.com/search?q=</a><br>
<a href="i:00phySE:https://physics.stackexchange.com/search?q=">phySE:https://physics.stackexchange.com/search?q=</a><br>
<a href="i:00physicsForum:https://www.physicsforums.com/search/2195918/?q=">physicsForum:https://www.physicsforums.com/search/2195918/?q=</a><br>
<a href="i:00chemSE:https://chemistry.stackexchange.com/search?q=">chemSE:https://chemistry.stackexchange.com/search?q=</a><br>
<a href="i:00chem:https://www.ncbi.nlm.nih.gov/pccompound?term=">chem:https://www.ncbi.nlm.nih.gov/pccompound?term=</a><br> <a href="i:00chem:https://www.ncbi.nlm.nih.gov/pccompound?term=">chem:https://www.ncbi.nlm.nih.gov/pccompound?term=</a><br>
<a href="i:00proofwiki:https://proofwiki.org/w/index.php?search=">proofwiki:https://proofwiki.org/w/index.php?search=</a><br> <a href="i:00proofwiki:https://proofwiki.org/w/index.php?search=">proofwiki:https://proofwiki.org/w/index.php?search=</a><br>
<a href="i:00physics:http://www.physics.org/explore-results-all.asp?q=">physics:http://www.physics.org/explore-results-all.asp?q=</a><br> <a href="i:00physics:http://www.physics.org/explore-results-all.asp?q=">physics:http://www.physics.org/explore-results-all.asp?q=</a><br>

View file

@ -3,12 +3,43 @@
<source id="src" /> <source id="src" />
</video> </video>
<script src="https://cdn.jsdelivr.net/npm/plyr"></script> <script src="https://cdn.jsdelivr.net/npm/plyr"></script>
<script src="https://cdn.jsdelivr.net/hls.js/latest/hls.js"></script>
<script> <script>
{//?u= const source = location.search.substring(3);//?u=
let url = location.search.substring(3); {
let d = document; let d = document;
let e = d.getElementById("src"); let e = d.getElementById("src");
e.src = url; e.src = source;
}
const video = document.querySelector("video");
const defaultOptions = {};
if (Hls.isSupported()) {
const hls = new Hls();
hls.loadSource(source);
hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {
const availableQualities = hls.levels.map((l) => l.height);
defaultOptions.quality = {
default: availableQualities[0],
options: availableQualities,
forced: true,
onChange: (e) => updateQuality(e),
}
// Initialize new Plyr player with quality options
const player = new Plyr(video, defaultOptions);
});
hls.attachMedia(video);
window.hls = hls;
} else {
const player = new Plyr(video, defaultOptions);
}
function updateQuality(newQuality) {
window.hls.levels.forEach((level, levelIndex) => {
if (level.height === newQuality) {
console.log("Found quality match with " + newQuality);
window.hls.currentLevel = levelIndex;
}
});
} }
const player = new Plyr('#player');
</script> </script>