问题
I'm using JWPlayer 6.8 (latest) to play RTMP streams.
The example page code is as simple as:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JWPlayer Stream Test</title>
<script type="text/javascript" src="jwplayer/jwplayer.js"></script>
</head>
<body>
<div id="canvas"></div>
<script type="text/javascript">
jwplayer('canvas').setup({
file : "stream.smil",
width : 1024,
height : 768
})
</script>
</body>
</html>
The SMIL manifest:
<smil>
<head>
<meta base="rtmp://192.168.1.160:1340/live/" />
</head>
<body>
<switch>
<video src="large" width="1024" height="768" system-bitrate="2000000" />
<video src="small" width="640" height="480" system-bitrate="800000" />
</switch>
</body>
</smil>
Everything is very basic here, just for the sake of testing. This works in Chrome, Safari, Opera, Firefox, but fails on IE11. Tried in compatibility mode as IE8, also failed.
I have also tried passing in as file
a single stream: rtmp://192.168.1.160:1340/live/large
, which also fails.
The failing part is quite mystic.
Once the JW loads, it's background is black with play button. I click the play button, buffering icon shows up, loads for some time, background changes to white and I start to hear audio from the stream. After about 1sec. the audio stops, video stays white and nothing else happens.
None of the effects appear on other browsers.
What could be the problem here?
回答1:
Bah, a second too late, just found the answer here - http://support.jwplayer.com/customer/portal/questions/6242868-white-screen-using-ie1-11-windows7.
It's IE's GPU rendering, which has to be turned off.
Setting stagevideo
to false
in JW player's setup configuration resolves the issue.
EDIT:
Apparently, the video stops after 1 second anyways. Seems to be unrelated. Doesn't happen on other browsers again, making a new question: RTMP stream on IE dies after ~1 second.
来源:https://stackoverflow.com/questions/23543517/rtmp-stream-plays-sound-for-1-second-then-stops-no-video-at-all