im using jwplayer for my script to get youtube videos
same edits i needed for my site to make player work good
same videos in youtube have tips so if i add it to my site it show tips without close button
how can i disable tips from youtube to stop it
other request how i make video preview from youtube like youtube player in jwplayer
and how to display related files (it work with old jwplayer but new jwplayer need same edit for make related work)
my sctipt is onaracde
and this is old related.php
<?php
/**
* onArcade 2.2.3
* Copyright © 2006-2009 Hans , All Rights Reserved
**
* ONARCADE IS NOT FREE SOFTWARE!
* http://www.onarcade.com
**/
session_start();
define('PAGE', 'related');
require ('includes/config.php');
header ('Content-type: text/xml; charset=utf-8');
echo '<?xml version="1.0" encoding="utf-8"?>
<videolist>
<title>مشابهه فيديوهات:</title>';
$file_id = (int) $_GET['f']; // get file id
// Get file information from database... this is one big and ugly query
$file_sql = "
SELECT
file.*,
cat.name AS category_name, cat.permissions, cat.status AS category_status";
if ($settings['added_by'] == 1)
$file_sql .= ", ad.username AS adder_username";
$file_sql .= "
FROM
". $tbl_prefix ."files AS file
LEFT JOIN ". $tbl_prefix ."categories AS cat ON (cat.catid = file.category)";
if ($settings['added_by'] == 1)
$file_sql .= " LEFT JOIN ". $tbl_prefix ."users AS ad ON (ad.userid = file.added_by)";
$file_sql .= "
WHERE file.fileid = ". $file_id ." && file.status = '1'
LIMIT 1";
$file_query = mysql_query($file_sql); // run query
$file_row = mysql_fetch_assoc($file_query);
// get related files from database
if ($settings['related_files'] == 1) {
$related_query = mysql_query("SELECT fileid, title, description, icon, iconlocation, timesplayed FROM ". $tbl_prefix ."files WHERE category = ". $file_row['category'] ." && status ='1' && fileid != ". $file_id ." ORDER BY RAND() LIMIT ". $settings['max_related_files']);
while ($related_row = mysql_fetch_assoc($related_query))
$txt['related'][] = array (
'fileid' => $related_row['fileid'],
'title' => $related_row['title'],
'url' => fileurl($related_row['fileid'],$related_row['title']),
'description' => $related_row['description'],
'image' => file_image_url($related_row['icon'], $related_row['iconlocation'])
);
}
foreach ($txt['related'] as $related) {
echo '
<video id="'. $related['fileid'] .'">
<title>'. $related['title'] .'</title>
<thumb>', (str_replace('hqdefault.jpg', 'default.jpg', $related['image'])) ,'</thumb>
<url>'. $related['url'] .'</url>
</video>';
}
echo '
</videolist>';
?>
and this is jwplayer settings file
<div id="resize_file" style="width:{$width}px;height:{$height}px;">
<script type="text/javascript" src="player/jwplayer.js"></script>
<script type="text/javascript">
jwplayer("container").setup({
file:"{$file_url}",
image: "{$file_image}",
autostart: "true",
aboutlink:"http://elfnon.com",
abouttext:"elfnon.CoM",
allowscriptaccess:"always",
height: {$height},
width: {$width},
wmode:"opaque",
volume:"100",
icons:"true",
bufferlength:"900",
related: {
file: '{$siteurl}/jw6-related.xml',
onclick: 'link'
},
modes:[
{ type:'html5' }
]
});
jwplayer("container").onPlay(function () {
setTimeout(function(){
document.getElementById('container-holder').className = '';
}, 1000);
});
</script>