Hi,
I am trying to get mp4 video to play on our website without varying degrees of success. the code is as follows:
{if logged_out}
{redirect="/portal"}
{/if}
<object classid=‘clsid:D27CDB6E-AE6D-11cf-96B8-444553540000’ width=‘800’ height=‘450’ id=‘single1’ name=‘single1’>
<embed
id=‘single2’
name=‘single2’
src=’/portal_files/videos/{segment_3}/{segment_4}/{segment_5}’
width=‘800’
height=‘450’
bgcolor=’#fff’
allowscriptaccess=‘always’
allowfullscreen=‘true’
/>
</object>
<?php
global $DB,$IN;
$video = $IN->fetch_uri_segment(‘5’);
$product = $IN->fetch_uri_segment(‘4’);
$type = $IN->fetch_uri_segment(‘3’);
$path_to_video = $IN->URI;
if(!empty($video)){
$existingVideo = $DB->query("SELECT * FROM exp_insp_popularvideos WHERE path_to_video = '".$DB->escape_str($path_to_video)."' LIMIT 1");
if ($existingVideo->num_rows > 0)
{
$watch_count = $existingVideo->row['watch_count'] + 1;
$data = array('watch_count' => $watch_count);
$sql = $DB->update_string('exp_insp_popularvideos', $data, "path_to_video = '".$path_to_video."'");
} else {
$data = array(
'watch_count' => "1",
'video' => $video,
"path_to_video" => $path_to_video,
"product" => $product,
"type" => $type
);
$sql = $DB->insert_string('exp_insp_popularvideos', $data);
}
$DB->query($sql);
}
?>
Currently as the code lies, I can play MP4 video but it will not resize or show any controls in the player. As the video is 1080*780 it will not fit in the screen properly and will not play in IE at all.
I am not a developer and have very little experience with HTML, PHP etc so need a bit of an idiots guide to get this working..
Any pointers would be greatly appreciated.
Dracuusfly