Debuging Flash player

I have been trying to write an “ITV Player plugin”.

I have managed to parse the Episode data but I cannot get the video to start.

I am using the following line to create my episode thumbnails.


<br />
dir.Append(WebVideoItem('http://www.itv.com/itvplayer/video/?Filter='+filterUrl[(filterIdx+7):], title=sender.itemTitle, subtitle=date, summary=summary, duration=duration, thumb=thumb))<br />




I have got some simple debugging output from the Media Server.

<br />
Request: GET /video/:/webkit?url=http%3A%2F%2Fwww.itv.com%2Fitvplayer%2Fvideo%2F%3FFilter%3D114178&prefix=/video/itv-player<br />
<br />
 * url => http://www.itv.com/itvplayer/video/?Filter=114178<br />
<br />
 * prefix => /video/itv-player<br />
<br />
WebKit: [itv.com/itvplayer/video/?Filter=114178]<br />
Found corresponding plug-in: /Users/cjd/Library/Application Support/Plex Media Server/Plug-in Support/Data/com.plexapp.plugins.itv-player<br />
Resetting to state playing<br />
Using /Users/cjd/Library/Application Support/Plex Media Server/Plug-ins/ITV Player.bundle/Contents/Site Configurations/itv__clips.xml with score of 35.<br />
LINE: HELLO<br />
Received title [Video - ITV Player].<br />
Debugger() was called!<br />
0x168a7c40 Plugin loaded [itv.com/mercury/Mercury_VideoPlayer.swf?v=1.1.150] (195 188 615 346 Mercury_VideoPlayervideoplayer)<br />
0x168c05f0 Plugin loaded [itv.com/mercury/MercuryAutoResume.swf?v=1.1.150] (0 0 1 1 MercuryAutoResume)<br />
0x168c05f0 New frame size: 1.000000 x 1.000000<br />
0x168a7c40 New frame size: 615.000000 x 346.000000<br />
Frame was loaded.<br />




I see no further output from the media center and the Plex window says "Opening Stream" (I am using Aeon)

Finally below is the Site Config I am using. I have copied the one from 4od and changed just the urls. (I intended to get that much working and then go on to states and sidebars.


<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<site site="http://www.itv.com/itvplayer/video/*" plugin="http://www.itv.com/mercury/Mercury_VideoPlayer_Nine.swf*" initialState="playing" version="1.0">			 <br />
<br />
<br />
	<crop x="56" y="32" width="615" height="346" />		<br />
	<condition name="paused"><br />
    <and><br />
      <color x="7" y="360" rgb="ffffff" /><br />
      <color x="7" y="365" rgb="ffffff" /><br />
      <color x="11" y="363" rgb="ffffff" /><br />
    </and><br />
  </condition><br />
<br />
<br />
	<state name="playing"><br />
    <event><br />
			<condition><br />
				<command name="pause" /><br />
			</condition><br />
			<action><br />
				<click x="9" y="363" /><br />
				<goto state="paused" /><br />
			</action><br />
		</event><br />
		<event><br />
			<condition><br />
        <and><br />
          <color x="305" y="170" rgb="ffffff"/><br />
          <color x="305" y="180" rgb="ffffff"/><br />
          <color x="315" y="175" rgb="ffffff"/><br />
          <color x="320" y="160" op="dimmer-than" rgb="eeeeee"/><br />
          <color x="320" y="190" op="dimmer-than" rgb="eeeeee"/><br />
          <color x="295" y="175" op="dimmer-than" rgb="eeeeee"/><br />
        </and><br />
			</condition><br />
			<action><br />
				<goto state="end" /><br />
			</action><br />
		</event><br />
	</state><br />
	<br />
	<state name="paused"><br />
    <event><br />
			<condition><br />
				<command name="play" /><br />
			</condition><br />
			<action><br />
				<click x="9" y="363" /><br />
				<goto state="playing" /><br />
			</action><br />
		</event><br />
	</state><br />
	<br />
</site><br />




Any pointers would be most appreciated

Chris

Hi,



ITV would be a nice addition. I don’t think its finding the flash player. This worked for me (obviously with no play/pause etc controls):



<br />
<?xml version="1.0" encoding="UTF-8"?><br />
<site site="http://www.itv.com/itvplayer/video/*" plugin="http://www.itv.com/mercury/.*" initialState="playing" version="1.0">                        <br />
<br />
<br />
        <crop x="0" y="0" width="0" height="0" />         <br />
        <condition name="paused"><br />
  		</condition><br />
<br />
<br />
        <state name="playing"><br />
        </state><br />
        <br />
        <state name="paused"><br />
        </state><br />
        <br />
</site><br />




Jonny

Thank Jonny



This gave me a starting point.

I have managed to get some video data to play. However I am having a few issues that I do not understand.



If I use a size of 615x346 then Plex initialises a shared memory segment of 0x0 rather than 615x346.

This results in a black screen and nothing playing



If on the other hand I crop my image to 555x334 then the first time I play a video it works (all be it only part of the screen).

However if I stop watching the episode and start another episode then the second one is created with a size of 0x0 again.

Stoping the video and restarting results in the video running again.





Is there a size limit to the Flash player. And does anyone understand the issue of playing then not playing on the same episode.



If there is any pertinant information I have left out, please tell me what I need to provide.





Chris

Is there only one Flash object on the page? The only time I’ve observed behaviour like that is when more than one Flash object gets matched by the regular expression, in which case it’s pretty random as to which one the WebKit player will lock on to. The site configuration Jonny posted uses a wildcard, so any Flash object loaded from the /mercury directory would be matched.

Thanks Jam



Will not get time to look at it till at least Tuesday.

Think that might explain the flipping issue, not sure that it explains the size issue, however I should not prejudge this





Chris

From you first message it looks like Jam could be correct:



<br />
0x168a7c40 Plugin loaded [itv.com/mercury/Mercury_VideoPlayer.swf?v=1.1.150] (195 188 615 346 Mercury_VideoPlayervideoplayer)<br />
0x168c05f0 Plugin loaded [itv.com/mercury/MercuryAutoResume.swf?v=1.1.150] (0 0 1 1 MercuryAutoResume)<br />




Looks like two swf files are being recognised, second one of size 1x1. Change the plugin param to match the first not the second may work?

For the second issue, it could just be the same thing but could there also be a caching issue perhaps? By default, Plex will cache the html page you are using and if the flash player embedded in that page has some sort of time stamp in it it may not play the second time. This is all a guess mind but easy to check, just set cacheTime=0 when you load the page.

Jonny


Setting cacheTime only affects HTTP requests made by the plug-in framework (within your Python code). When you want to load a page for the purpose of playing media, it's all handled by WebKit. It could still be related to caching, but there isn't anything you can do in the plug-in code to control how WebKit behaves.

I wasn’t clear. I was more thinking the html may have a media stream url that somehow has a time dependent parameter embedded in it. So the url is valid first time but not later. Reloading the html on subsequent plays would regenerate a valid url. Again, all hypothetical.





Hi did anyone get any further with the ITV Plex plugin, I am at a similar point developing my ITV plugin, I just need to complete the xml config, I am trying to see if I can hook into the javascript to control the flash plugin. Thought I would check nobody has already done this?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.