First off, I am truly loving Dolphin. Have been playing with it for about a year, and all functions have worked beyond expectations. And now here I am, requesting your assistance. I have searched the forums in regards to this topic, but unable to find a suitable answer for my needs, most issues are just in getting the media player to work - which i managed to do in one upload and setup.
So far, I have managed to create a php block which will play movies on iPad based upon the user agent string that is in the browser info. I uploaded the video, and used the embed code along with another bit of code I found online, and this is what I came up with:
?>
<script type="text/javascript">
var agent=navigator.userAgent.toLowerCase();
var is_iphone = (agent.indexOf('iphone')!='-1');
var is_ipad = (agent.indexOf('ipad')!='-1');
if (is_iphone) {
document.write("<video src='http://mtsco.net/flash/modules/video/files/3.m4v' controls='controls' width='100%' height='280'></video>");
}
else if (is_ipad) {
document.write("<video src='http://mtsco.net/flash/modules/video/files/3.m4v' controls='controls' width='100%' height='280'></video>");
}
else {
document.write("<object style='display:block;' width='100%' height='400'><param name='movie' value='http://mtsco.net/flash/modules/global/app/holder_as3.swf'></param><param name='allowScriptAccess' value='always'></param><param name='allowFullScreen' value='true'></param><param name='base' value='http://mtsco.net/flash/modules/video/'></param><param name='bgcolor' value='#FFFFFF'></param><param name='wmode' value='opaque'></param><param name='flashVars' value='url=http://mtsco.net/flash/XML.php&module=video&app=player&id=3&user=&password='></param><embed src='http://mtsco.net/flash/modules/global/app/holder_as3.swf' type='application/x-shockwave-flash' width='100%' height='400' allowScriptAccess='always' allowFullScreen='true' base='http://mtsco.net/flash/modules/video/' bgcolor='#FFFFFF' wmode='opaque' flashVars='url=http://mtsco.net/flash/XML.php&module=video&app=player&id=3&user=&password='></embed></object>");
}
</script>
<?php { }
This works perfectly when placing this code in a php block. Now I need to know where/how can i change the existing code block which handles the default video player. I want to add the agent/navigator script so that it can handle all videos on site.
The only thing I have found so far is /modules/boonex/videos/templates/base/view_unit.html. This handles the formatting for the block and where the video player would be, there is a '_file_'.
I will ocntinue to try and figure this out, but any assistance would be appreciated.
Thank You in Advance,
Calvin
