1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Player: Use H5 native to play mp4. (#3262)

This commit is contained in:
Winlin 2022-11-21 19:00:33 +08:00 committed by GitHub
parent 057b1392c0
commit 59d37abc2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -169,6 +169,12 @@
stopPlayers(); stopPlayers();
if (!r) return; if (!r) return;
// Use H5 native to play mp4.
if (r.stream.indexOf('.mp4') > 0) {
$('#video_player').attr('src', r.url).show();
return;
}
// Start play HTTP-FLV. // Start play HTTP-FLV.
if (r.stream.indexOf('.flv') > 0) { if (r.stream.indexOf('.flv') > 0) {
if (!flvjs.isSupported()) { if (!flvjs.isSupported()) {