fix: issues with default player
This commit is contained in:
@@ -142,10 +142,19 @@ const play = (hash, type) => {
|
||||
player.play();
|
||||
});
|
||||
} else if (player.canPlayType("application/vnd.apple.mpegurl")) {
|
||||
player.src = source;
|
||||
player.addEventListener("loadedmetadata", function () {
|
||||
player.play();
|
||||
});
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', source, true);
|
||||
xhr.setRequestHeader("Authorization", "Bearer " + __GA);
|
||||
xhr.responseType = 'blob';
|
||||
xhr.onload = function () {
|
||||
if (xhr.status === 200) {
|
||||
player.src = URL.createObjectURL(xhr.response);
|
||||
player.addEventListener("loadedmetadata", function () {
|
||||
player.play();
|
||||
});
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user