Hi, I am implementing the flash video player in matrix and have successfully make use of triggers, paint layouts (for dynamic xml generation based in the metadata filled), designs (xml instead of html), etc for this purpose. The flash video successfully loads the playlist (which is a child of the video container page), but not without pain. Testing result:
Firefox, Opera, Safari:
While not logged in to Mysource Matrix - Works over HTTP, HTTPS
While logged in to Mysource Matrix - Works over HTTP, HTTPS
Internet Explorer:
While not logged in to Mysource Matrix - Works over HTTP, HTTPS
While logged in to Mysource Matrix - Works over HTTP, does NOT work over HTTPS
Currently the site is configured to allow for both http and https. Ideally the site should be force secure (https).
I have read some articles about IE bug when streaming XML over https. But i cannot be sure if it is related as it only happens when user is logged into Mysource Matrix (using IE). Is there a configuration in MySource Matrix which i should turn off or on to possibly overcome this?
Thanks in advance for any help. I have tried to put in all the information i can think of which may be useful.
Example video container:
<div id="player" style="padding:20px; text-align:center;"><p style="padding: 20px; border: 1px dotted #ccc;">We are sorry you are unable to view the video. <br/>You do not have javacript enabled or your browser does not have a <a href="http://www.adobe.com/products/flashplayer/" target="_blank">Flash Player (minimum version 9.0.124)</a> installed.</p>
</div>
<script type="text/javascript">
var so = new SWFObject('/__data/assets/file/0006/200967/player.swf','mp1','640','260','9.0.124');
so.addParam('allowscriptaccess','always');
so.addParam('allowfullscreen','true');
so.addParam('flashvars','file=./playlist.xml&playlistsize=280&playlist=right&controlbar=bottom&quality=false&stretching=fill');
so.addVariable('bufferlength','3');
so.write('player');
</script>
<p style="text-align:center;">DEBUG: View the <a href="./playlist.xml">XML Playlist</a></p>
</div></pre><br />
Example playlist:
<?xml version="1.0" encoding="utf-8" ?>
Cricket
Video description sample
/_media/spidar_video_player/core_files/spidar_wrapper?inst=1574C13A-721D-3C66-A57E-349603944036&disp=5&type=flv
/_media/spidar_video_player/core_files/spidar_wrapper?inst=1574C13A-721D-3C66-A57E-349603944036&disp=2
/_media/spidar_video_player/core_files/spidar_wrapper?inst=1574C13A-721D-3C66-A57E-349603944036&disp=3
White water
This is a short description of this video
/_media/spidar_video_player/core_files/spidar_wrapper?inst=68B74C8D-3040-C566-6077-9E445F367B5&disp=5&type=flv
/_media/spidar_video_player/core_files/spidar_wrapper?inst=68B74C8D-3040-C566-6077-9E445F367B5&disp=2
/_media/spidar_video_player/core_files/spidar_wrapper?inst=68B74C8D-3040-C566-6077-9E445F367B5&disp=3
Swimming Pool
Another short description example. Maximum 2 lines
/_media/spidar_video_player/core_files/spidar_wrapper?inst=731E6FBF-C33A-674B-3B88-3CD0CC4D13C0&disp=5&type=flv
/_media/spidar_video_player/core_files/spidar_wrapper?inst=731E6FBF-C33A-674B-3B88-3CD0CC4D13C0&disp=2
/_media/spidar_video_player/core_files/spidar_wrapper?inst=731E6FBF-C33A-674B-3B88-3CD0CC4D13C0&disp=3
Archery
Description of video
/_media/spidar_video_player/core_files/spidar_wrapper?inst=2773388C-CCD9-A779-D84A-D6FEC75F323C&disp=5&type=flv
/_media/spidar_video_player/core_files/spidar_wrapper?inst=2773388C-CCD9-A779-D84A-D6FEC75F323C&disp=2
/_media/spidar_video_player/core_files/spidar_wrapper?inst=2773388C-CCD9-A779-D84A-D6FEC75F323C&disp=3
Yep, this is probably the IE bug where it doesn’t handle cached headers properly…you could try clear all your cache and reload the page over SSL and see if it works (probably will), but I think the only way of fixing this is to change the http headers. This would involve changing matrix php, or somehow loading an extra php script (which changes the header) for these pages which I’m sure would have many flow on effects. Hopefully a developer might have some clever ideas
[quote]Yep, this is probably the IE bug where it doesn’t handle cached headers properly…you could try clear all your cache and reload the page over SSL and see if it works (probably will), but I think the only way of fixing this is to change the http headers. This would involve changing matrix php, or somehow loading an extra php script (which changes the header) for these pages which I’m sure would have many flow on effects. Hopefully a developer might have some clever ideas
Thanks for the quick reply and the links. It’s probably time i talk to the server admin about the no-cache headers. been trying to avoid this if it can all be controlled within MySource Matrix. So if i understand correctly, it is the XML file which should not be cached, yes? I thought of using the funky ‘/_nocache’ at the end of playlist.xml and also passing a dummy timestamp parameter so it’s different everytime, but hehe that’s just grapsing at straws now.
<script type=‘text/javascript’>
[color="#FF00FF"]var timeStamp = new Date().valueOf();
var nocahcePlaylist = ‘file=playlist.xml/_nocache?timestamp=’+timeStamp;
var s1 = new SWFObject(’./?a=200967’,‘ply’,‘340’,‘250’,‘9.0.124’,’#ffffff’);
Matrix has this option on the System Configuration screen:
[quote]Send no-cache header for File assets
If enabled, the "no-cache" Cache-Control option will be sent when serving File asset types. This option can be used to resolve inline file display issues in Internet Explorer.[/quote]
But this is only for File assets and not for pages. So if you XML was a File asset, you could turn this on to get around the SSL issue. If it is generated dynamically using asset listing, there is currently no way to tell Matrix to send a no-cache header for the specific URL.
There is an option to send a "no-cache" header for File assets. This option was introduced in response to inline PDF display issues in IE, and may be useful in the scenario you have mentioned.
The option, "Send no-cache header for File assets", is available in the "HTTP Headers Settings" section in "System Configuration". Enabling this might resolve the issue.
Oh noooo. I thought this would be it, but the XML file is actually a Page asset with metadata applied to it. I had wanted to make the XML a File asset with metadata, but ran into the problem of not being able to apply a Paint Layout to it. If i remember correctly, the error was that this action (applying a Paint Layout) is not allowed on a file asset. Yes?
The reason i need to use the paint layout is so that i can test for filled metadata values and generate the playlist based on the values that exist-- so the playlist wont display empty item.
The requirements for the playlist: I need to use an asset which;
Allows metadata to be applied to it (to specify the video sources)
Allows a design to be applied to it (to use xml design)
Allows a paint layout applied to it (to render the non-empty metadata values as an item in the playlist)
Due to trigger actions, the asset should not be commonly used (ideal case, but can live with any because it really needs to be named 'playlist.xml')
In order not to confuse users, the asset should not have child associated with it (like standard pages, or asset listing page which auto generate child folders/divs/contents).
I might have missed something… Is there any other file asset i can use perhaps? All help so far (and hopefully more help and great ideas) would greatly be appreciated!
There is no File asset you can use. File asset can only ever be static and cannot have designs or paint layouts applied. So I believe you are still going to have the IE problem regardless of what you do, besides turning off caching or using Apache to override the header for that URL.
*If* the XML pages are all in one part of the site, e.g. /xml/playlist_name, then you could use the FilesMatch directive in your apache config to change the headers as the page is served.
Or you could just apply them to any file that matched !/playlist.xml$!
That regex means any URL that ends in /playlist.xml.
thanks for the info. I cant help wondering if it means anything that the problem (i.e. loading the xml playlist in the video player over HTTPS) only exists when user is logged in to mysource matrix?
It's all good when user is not logged in and viewing the video page over HTTPS. See screenshots. (Sorry about the blurred stuff. Just not sure about organisation policies around sending screenshots).
Also the secondary player is just my test with the timestamp hack for no caching, pls ignore.