1

我正在尝试将 nsv 流嵌入到 jw 播放器中。不幸的是,它不适用于版本 6+。有人能告诉我为什么吗?

链接: http ://test.blackbeats.fm/streams/webplayer.php

代码:

<!DOCTYPE html>
<head>
<title>Webplayer</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script type="text/javascript" src="jwplayer/jwplayer.js"></script>
</head>
<body>

<div id='mediaspace'>This text will be replaced</div>
<script type='text/javascript'>
jwplayer('mediaspace').setup({
'flashplayer': 'http://www.blackbeats.fm/webplayer/player.swf',
'file': 'http://stream.blackbeatslive.de/;stream.nsv',
'type': 'mp3',
'provider': 'sound',
'autostart': 'true',
'controlbar': 'bottom',
'width': '470',
'height': '120'
});
</script>
</body>
</html>

奇怪的是,它适用于以下代码和旧版本的 jw:

<script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>-->
<script type="text/javascript">
var flashvars =
{
'file': 'http://stream.blackbeatslive.de/;stream.nsv',
'title': 'My Stream',
'type': 'sound',
'duration': '99999',
'frontcolor': '86C29D', // text & icons (green)
'backcolor': '003367', // playlist background (blue)
'lightcolor': 'C286BA', // selected text/track highlight (red)
'screencolor': 'FFFFFF', // screen background (black)
'id': 'playerID',
'autostart': 'true',
'skin': 'kleur/kleur'

};

var params =
{
'allowfullscreen': 'true',
'allowscriptaccess': 'always',
'bgcolor': '#FFFFFF'
};

var attributes =
{
'id': 'playerID',
'name': 'playerID'
};

swfobject.embedSWF('player.swf', 'mediaspace', '600', '200', '9.0.124', false, flashvars, params, attributes);
</script>

提前致谢!

4

1 回答 1

1

If you are using JW6, make sure to set the player's type variable to mp3 and the primary variable to flash, and this will work.

于 2013-06-24T16:47:57.417 回答