sliverdust
Messages postés7Date d'inscriptionjeudi 23 janvier 2003StatutMembreDernière intervention28 mai 2010
-
27 mai 2010 à 17:05
sliverdust
Messages postés7Date d'inscriptionjeudi 23 janvier 2003StatutMembreDernière intervention28 mai 2010
-
28 mai 2010 à 11:02
Salut.
J'utilise actuellement le jw player avec playlist pour une série de vidéos que j'ai mis sur mon serveur.
<script type='text/javascript'>
var so = new SWFObject('http://www.monsite.com/player.swf','mpl','700','300','9');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('playlistfile','http://www.monsite.com/playlist.asp');
so.addVariable('backcolor','333333');
so.addVariable('frontcolor','FFFFFF');
so.addVariable('lightcolor','007EBB');
so.addVariable('playlistsize','300');
so.addVariable('playlist','right');
so.addVariable('repeat','list');
so.write('mediaspace');
</script>
---------------------------------------------------
Jusque la tout va bien.
Je possède une base access (bdd_videos.mdb) avec une table (rs_video) qui comporte plusieurs videos (champs : title, creator, ect...)
Pour que ma playlist s'autogénère je crée une page asp (la playlist : playlist.asp) qui va communiquer avec ma base et qui va construire une page xml pour que le lecteur les affichent.
sur ma page playlist.asp voici le code :
-----------------------------------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
set rs=Server.CreateObject("adodb.Recordset")
set conn=server.createobject("adodb.connection")
DSNtemp="DRIVER={Microsoft Access Driver (*.mdb)}; "
DSNtemp=dsntemp & "DBQ=c:\web\monserveur\bases\bdd_videos.mdb"
%>
<%
Conn.Open DSNtemp
SQL "Select * From [rs_video] where id_congres 2 order by id_video"
RS.Open SQL, Conn,3,3
if not RS.Eof then
Response.Charset = "UTF-8"
Response.ContentType = "text/xml"
xml = "<?xml version=""1.0"" encoding=""UTF-8"" standalone=""no""?>"
xml = xml &""
xml = xml &"<trackList>"
xml = xml &"<title>videos TV</title>"
xml = xml &"<link>http://www.monsite.com</link>"
xml = xml &"<description>En direct de la SORLAF</description>"
xml = xml &"<managingEditor>info@monsite.com</managingEditor>"
xml = xml &"<language>fr</language>"
xml = xml &"<generator>société yoyo</generator>"
xml = xml &"<copyright>société yoyo</copyright>"
xml = xml &"<webMaster>société yoyo Webmaster</webMaster>"
while not RS.Eof
xml = xml &"<track>"
xml = xml &"<title>"&RS("titre_court")&"</title>"
xml = xml &"<typevideo>"&RS("typevideo")&"</typevideo>"
xml = xml &"<datevideo>"&RS("date_video")&"</datevideo>"
if RS("presentateur") <> "" then
xml = xml &""&RS("presentateur")&"
"
end if
xml = xml &"<creator>"&RS("droit_video")&"</creator>"
xml = xml &""&RS("titre")&""
xml = xml &"<location>"&RS("lien_video")&"</location>"
xml = xml &" "&RS("vignette_chemin")&" "
xml = xml &"http://www.monsite.com"
xml = xml &"<duration>"&RS("duree")&"</duration>"
xml = xml &"</track>"
RS.MoveNext
Wend
xml = xml &"</trackList>
"
Response.Write xml
end if ' if not RS.Eof then
%>
-------------------------------------------------------
Lorsqur j'essai d'afficher ma page essai.asp sur mon navigateur l'emplacement du module s'affiche sans rien dedans. Il y a une barre de chargement qui cherche sans rien trouver et/ou afficher.
Pouvez vous me dire s'il y a des erreurs dans mon script asp pour construire le xml.
Par contre si je fais pointer directement vers un fichier
xml les videos s'affichent
sliverdust
Messages postés7Date d'inscriptionjeudi 23 janvier 2003StatutMembreDernière intervention28 mai 2010 28 mai 2010 à 11:02
Merci pour ta réponse BBFUNK01 . J'ai finalement trouvé le hic. Il vient de la construction de ma page xml dans essai.asp
Voilà ce que ça donne après correction (pour ceux que ça interresse):
<%
Conn.Open DSNtemp
SQL "Select * From [rs_video] where id_congres 2 order by id_video"
RS.Open SQL, Conn,3,3
if not RS.Eof then
Response.Charset = "UTF-8"
Response.ContentType = "text/xml"
xml = "<?xml version=""1.0"" encoding=""UTF-8"" standalone=""no""?>"
xml = xml &""
xml = xml &"<title>videos TV</title>"
xml = xml &"<link>http://www.monsite.com</link>"
xml = xml &"<description>En direct de la SORLAF</description>"
xml = xml &"<managingEditor>info@monsite.com</managingEditor>"
xml = xml &"<language>fr</language>"
xml = xml &"<generator>société yoyo</generator>"
xml = xml &"<copyright>société yoyo</copyright>"
xml = xml &"<webMaster>société yoyo Webmaster</webMaster>"
xml = xml &"<trackList>"
while not RS.Eof
xml = xml &"<track>"
xml = xml &"<title>"&RS("titre_court")&"</title>"
xml = xml &"<typevideo>"&RS("typevideo")&"</typevideo>"
xml = xml &"<datevideo>"&RS("date_video")&"</datevideo>"
if RS("presentateur") <> "" then
xml = xml &""&RS("presentateur")&"
"
end if ' if RS("presentateur") <> "" then
xml = xml &"<creator>"&RS("droit_video")&"</creator>"
xml = xml &""&RS("titre")&""
xml = xml &"<location>"&RS("lien_video")&"</location>"
xml = xml &" "&RS("vignette_chemin")&" "
xml = xml &"http://www.monsite.com"
xml = xml &"<duration>"&RS("duree")&"</duration>"
xml = xml &"</track>"
RS.MoveNext
Wend
xml = xml &"</trackList>
"
Response.Write xml
end if ' if not RS.Eof then
%>
BBFUNK01
Messages postés1310Date d'inscriptionjeudi 16 juillet 2009StatutMembreDernière intervention20 juin 20146 27 mai 2010 à 22:27
Hello,
et bien à priori bonne déduction , si ça coince avec la playlist.asp mais pas avec la playlist.xml, c'est donc la playlist.asp qui pose problème. Tu devrais plutôt poster ton souci sur le forum VB ou ASP, à mon avis les experts en la matière te donneront des conseils plus avisés .
A plus,
BBFUNK01
//C'est en forgeant qu'on devient forgeron... ;-) ;