6 |
6 |
7 <link type="text/css" rel="stylesheet" href="http://hf.ci.wipsl.com/PleiXXPTsup/noheva-be/css/ovi.player.share.ui.css" /> |
7 <link type="text/css" rel="stylesheet" href="http://hf.ci.wipsl.com/PleiXXPTsup/noheva-be/css/ovi.player.share.ui.css" /> |
8 <link type="text/css" rel="stylesheet" href="musiccontext.css" /> <!-- CSS for music context area --> |
8 <link type="text/css" rel="stylesheet" href="musiccontext.css" /> <!-- CSS for music context area --> |
9 |
9 |
10 <!-- Player scripts --> |
10 <!-- Player scripts --> |
11 <script type="text/javascript" src="http://hf.ci.wipsl.com/PleiXXPTsup/noheva-be/js/publishplayer.js"></script> |
11 <script type="text/javascript" src="http://hf.ci.wipsl.com/PleiXXPTsup/noheva-be/js/publishplayer.js"></script> |
12 |
12 |
13 <!-- Local stuff to be implemented by user application to provide the contextual information --> |
13 <!-- Local stuff to be implemented by user application to provide the contextual information --> |
14 <script type="text/javascript" src="musiccontext.js"></script> |
14 <script type="text/javascript" src="musiccontext.js"></script> |
|
15 |
|
16 <!-- Error recovery in case page player script loading fails --> |
|
17 <script type="text/javascript"> |
|
18 var mybody = { |
|
19 onLoad: function () { |
|
20 if (window['music'] && |
|
21 window['ovi'] && |
|
22 ovi['player'] && |
|
23 ovi.player['publish'] ) { |
|
24 music.initPlayer(); |
|
25 music.updateContextArea(); |
|
26 } else { |
|
27 showErrorMessage(); |
|
28 } |
|
29 }, |
|
30 onFocus: function () { |
|
31 if (window['music']) { |
|
32 music.updateContextArea(); |
|
33 } |
|
34 } |
|
35 } |
|
36 function showErrorMessage() { |
|
37 var errorUi = "<H1>" + window.context.errorMessage() + "</H1>"; |
|
38 errorUi += "<input type='button' value='Close' onClick='context.owner().closeShareDialog();'>"; |
|
39 document.getElementById("ovi.player.share.ui").innerHTML = errorUi; |
|
40 } |
|
41 </script> |
|
42 |
15 </head> |
43 </head> |
16 <!-- onfocus refreshes only the song when publishplayer is set active / deactive --> |
44 <!-- onfocus refreshes only the song when publishplayer is set active / deactive --> |
17 <body onload="music.initPlayer(); music.updateContextArea();" |
45 <body onload="mybody.onLoad();" onfocus="mybody.onFocus();"> |
18 onfocus="music.updateContextArea();"> |
46 <div id="ovi.player.share.ui"></div> |
19 <div id="ovi.player.share.ui"> |
|
20 <h1>Loading...</h1> |
|
21 <input type="button" value="Close" onClick="context.owner().closeShareDialog();"> |
|
22 <input type="button" value="updateContextArea" onClick="music.updateContextArea();"> |
|
23 <input type="button" value="Clear JS Cache" onClick="window.context.owner().clearCache();"> |
|
24 </div> |
|
25 <!-- Now we should have publishplayer loaded, check and report error if failed --> |
|
26 <script type="text/javascript"> |
|
27 music.playerLoaded(); |
|
28 </script> |
|
29 </body> |
47 </body> |
30 </html> |
48 </html> |