IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage PHP Discussion :

Intégration de vidéos YouTube


Sujet :

Langage PHP

  1. #1
    Membre du Club Avatar de Casio
    Homme Profil pro
    Historien numérique
    Inscrit en
    Novembre 2005
    Messages
    312
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Historien numérique
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Novembre 2005
    Messages : 312
    Points : 59
    Points
    59
    Par défaut Intégration de vidéos YouTube
    Salutations,

    Je cherche à intégrer sur la home de notre page une barre représentant les 4 ou 5 DERNIERES vidéos rajoutées à notre chaine YouTube. Il n'est pas très important que les gens puissent le lire DEPUIS la barre, ils pourront par exemple cliquer dessus, mais il est en outre très important que cette barre soit CHRONOLOGIQUE, afin de communiquer sur nos dernières vidéos.

    J'ai trouvé ce code AJAX beta chez Google :
    -=> http://www.google.com/uds/solutions/.../videobar.html
    Dont voici le code

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    <!-- ++Begin Video Bar Wizard Generated Code++ -->
      <!--
      // Created with a Google AJAX Search Wizard
      // http://code.google.com/apis/ajaxsearch/wizards.html
      -->
     
      <!--
      // The Following div element will end up holding the actual videobar.
      // You can place this anywhere on your page.
      -->
      <div id="videoBar-bar">
        <span style="color:#676767;font-size:11px;margin:10px;padding:4px;">Chargement de la chaine WDA...</span>
      </div>
     
      <!-- Ajax Search Api and Stylesheet
      // Note: If you are already using the AJAX Search API, then do not include it
      //       or its stylesheet again
      -->
      <script src="http://www.google.com/uds/api?file=uds.js&v=1.0&source=uds-vbw"
        type="text/javascript"></script>
      <style type="text/css">
        @import url("http://www.google.com/uds/css/gsearch.css");
      </style>
     
      <!-- Video Bar Code and Stylesheet -->
      <script type="text/javascript">
        window._uds_vbw_donotrepair = true;
      </script>
      <script src="http://www.google.com/uds/solutions/videobar/gsvideobar.js?mode=new"
        type="text/javascript"></script>
      <style type="text/css">
        @import url("http://www.google.com/uds/solutions/videobar/gsvideobar.css");
      </style>
     
      <style type="text/css">
        .playerInnerBox_gsvb .player_gsvb {
          width : 320px;
          height : 260px;
        }
      </style>
      <script type="text/javascript">
        function LoadVideoBar() {
     
        var videoBar;
        var options = {
            largeResultSet : !true,
            horizontal : true,
            autoExecuteList : {
              cycleTime : GSvideoBar.CYCLE_TIME_MEDIUM,
              cycleMode : GSvideoBar.CYCLE_MODE_LINEAR,
              executeList : ["ytchannel:WDAssos"]
            }
          }
     
        videoBar = new GSvideoBar(document.getElementById("videoBar-bar"),
                                  GSvideoBar.PLAYER_ROOT_FLOATING,
                                  options);
        }
        // arrange for this function to be called during body.onload
        // event processing
        GSearch.setOnLoadCallback(LoadVideoBar);
      </script>
    <!-- ++End Video Bar Wizard Generated Code++ -->
    MAIS, cela affiche 4 vidéo, et ne semble pas représenter cela dans un quelconque ordre, et encore moins chronologiquement...

    Auriez-vous des idées / conseils ?

    A vous lire,
    Digital self-made Man - OnLine since 1993.
    https://wda-fr.org - https://mathieu.charreyre.net

  2. #2
    Modérateur
    Avatar de grunk
    Homme Profil pro
    Lead dév - Architecte
    Inscrit en
    Août 2003
    Messages
    6 691
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Lead dév - Architecte
    Secteur : Industrie

    Informations forums :
    Inscription : Août 2003
    Messages : 6 691
    Points : 20 222
    Points
    20 222
    Par défaut
    LA doc de l'API youtube sur la video bar :

    http://www.google.com/uds/solutions/videobar/index.html

    Tu devrais y trouver ton bonheur
    Pry Framework php5 | N'oubliez pas de consulter les FAQ Java et les cours et tutoriels Java

  3. #3
    Membre du Club Avatar de Casio
    Homme Profil pro
    Historien numérique
    Inscrit en
    Novembre 2005
    Messages
    312
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Historien numérique
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Novembre 2005
    Messages : 312
    Points : 59
    Points
    59
    Par défaut
    Citation Envoyé par grunk Voir le message
    (...)
    Tu devrais y trouver ton bonheur
    Bah non, justement...

    Any idea ?
    Digital self-made Man - OnLine since 1993.
    https://wda-fr.org - https://mathieu.charreyre.net

  4. #4
    Débutant
    Profil pro
    Inscrit en
    Février 2009
    Messages
    625
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2009
    Messages : 625
    Points : 219
    Points
    219

  5. #5
    Membre du Club Avatar de Casio
    Homme Profil pro
    Historien numérique
    Inscrit en
    Novembre 2005
    Messages
    312
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Historien numérique
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Novembre 2005
    Messages : 312
    Points : 59
    Points
    59
    Par défaut
    Merci, mais la encore, j'en étais arrivé à ce point AVANT de venir vous enquiquiner...
    Les vidéos sont affichées dans un ordre étrange, et non chronologique...

    Any idea ?
    Digital self-made Man - OnLine since 1993.
    https://wda-fr.org - https://mathieu.charreyre.net

  6. #6
    Expert éminent sénior

    Profil pro
    Inscrit en
    Septembre 2010
    Messages
    7 920
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Septembre 2010
    Messages : 7 920
    Points : 10 726
    Points
    10 726

  7. #7
    Membre du Club Avatar de Casio
    Homme Profil pro
    Historien numérique
    Inscrit en
    Novembre 2005
    Messages
    312
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Historien numérique
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Novembre 2005
    Messages : 312
    Points : 59
    Points
    59
    Par défaut
    Merci, je viens de tout parcourir... avec un réel intérêt.

    Néanmoins, je ne trouve nulle trace d'un classement chronologique possible...
    C'est étrange.... Suis-je donc le seul à soulever ce pb ?

    A vous lire,
    Digital self-made Man - OnLine since 1993.
    https://wda-fr.org - https://mathieu.charreyre.net

  8. #8
    Modérateur
    Avatar de grunk
    Homme Profil pro
    Lead dév - Architecte
    Inscrit en
    Août 2003
    Messages
    6 691
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Côte d'Or (Bourgogne)

    Informations professionnelles :
    Activité : Lead dév - Architecte
    Secteur : Industrie

    Informations forums :
    Inscription : Août 2003
    Messages : 6 691
    Points : 20 222
    Points
    20 222
    Par défaut
    Ca ne convient pas ? : http://code.google.com/intl/fr/apis/...html#orderbysp avec le paramètre "published"

    Sinon il est dit :
    Note: For a user's playlists or subscriptions feed, the default ordering is arbitrary.
    Pry Framework php5 | N'oubliez pas de consulter les FAQ Java et les cours et tutoriels Java

  9. #9
    Membre du Club Avatar de Casio
    Homme Profil pro
    Historien numérique
    Inscrit en
    Novembre 2005
    Messages
    312
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 47
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Historien numérique
    Secteur : High Tech - Matériel informatique

    Informations forums :
    Inscription : Novembre 2005
    Messages : 312
    Points : 59
    Points
    59
    Par défaut
    Citation Envoyé par grunk Voir le message
    Ca ne convient pas ? : http://code.google.com/intl/fr/apis/...html#orderbysp avec le paramètre "published"

    Sinon il est dit :
    YES... Merci, je viens de réussir, grace à votre aide, grunk, et aussi à une petite recherche sur Google pour l'implantation du code...

    Voici ce que cela donne à présent :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    <!-- ++Begin Video Bar Wizard Generated Code++ -->
      <!--
      // Created with a Google AJAX Search Wizard
      // http://code.google.com/apis/ajaxsearch/wizards.html
      -->
     
      <!--
      // The Following div element will end up holding the actual videobar.
      // You can place this anywhere on your page.
      -->
      <div id="videoBar-bar">
        <span style="color:#676767;font-size:11px;margin:10px;padding:4px;">Chargement de la chaine WDA...</span>
      </div>
     
      <!-- Ajax Search Api and Stylesheet
      // Note: If you are already using the AJAX Search API, then do not include it
      //       or its stylesheet again
      -->
      <script src="http://www.google.com/uds/api?file=uds.js&v=1.0&source=uds-vbw"
        type="text/javascript"></script>
      <style type="text/css">
        @import url("http://www.google.com/uds/css/gsearch.css");
      </style>
     
      <!-- Video Bar Code and Stylesheet -->
      <script type="text/javascript">
        window._uds_vbw_donotrepair = true;
      </script>
      <script src="http://www.google.com/uds/solutions/videobar/gsvideobar.js?mode=new"
        type="text/javascript"></script>
      <style type="text/css">
        @import url("http://www.google.com/uds/solutions/videobar/gsvideobar.css");
      </style>
     
      <style type="text/css">
        .playerInnerBox_gsvb .player_gsvb {
          width : 320px;
          height : 260px;
        }
      </style>
      <script type="text/javascript">
        function LoadVideoBar() {
    	//sort videos in bar by date
    	var bsc = GSvideoBar.prototype.buildSearchControl;
    	GSvideoBar.prototype.buildSearchControl = function() {
    	bsc.call(this);
    	this.vs.setResultOrder(google.search.Search.ORDER_BY_DATE);   this.vsBypass.setResultOrder(google.search.Search.ORDER_BY_DATE);   }
     
        var videoBar;
    	var barContainer = document.getElementById("videoBar");
     
        var options = {
    		string_allDone : "Close",
    		thumbnailSize : GSvideoBar.THUMBNAILS_MEDIUM,
            largeResultSet : !true,
            horizontal : true,
            autoExecuteList : {
              cycleTime : GSvideoBar.CYCLE_TIME_MEDIUM,
              cycleMode : GSvideoBar.CYCLE_MODE_LINEAR,
              executeList : ["ytchannel:WDAssos"]
            }
          }
     
        videoBar = new GSvideoBar(document.getElementById("videoBar-bar"),
                                  GSvideoBar.PLAYER_ROOT_FLOATING,
                                  options);
        }
        // arrange for this function to be called during body.onload
        // event processing
        GSearch.setOnLoadCallback(LoadVideoBar);
      </script>
    <!-- ++End Video Bar Wizard Generated Code++ -->
    Digital self-made Man - OnLine since 1993.
    https://wda-fr.org - https://mathieu.charreyre.net

  10. #10
    Membre à l'essai
    Homme Profil pro
    Inscrit en
    Octobre 2007
    Messages
    20
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : Canada

    Informations forums :
    Inscription : Octobre 2007
    Messages : 20
    Points : 15
    Points
    15
    Par défaut Nombre de vidéos
    Bonjour,
    Merci pour les infos... je cherchais exactement la même chose que vous. J'ai juste un dernier paramètre à régler et je ne le trouve pas :

    Par défaut, Youtube m'affiche les 8 derniers vidéos... comment modifie-t-on la variable 8 par 4... Je ne veux que les 4 derniers vidéos !

    Merci d'avance !

Discussions similaires

  1. Réponses: 1
    Dernier message: 03/07/2014, 15h30
  2. [Débutant] Intégration vidéo youtube
    Par Pynouz dans le forum ASP.NET
    Réponses: 3
    Dernier message: 10/10/2013, 14h39
  3. Intégration vidéos youtube
    Par romeo5454 dans le forum Intégration
    Réponses: 0
    Dernier message: 28/02/2010, 15h32
  4. Intégrer le lecteur vidéo YouTube à mon site web
    Par sigap dans le forum Imagerie
    Réponses: 1
    Dernier message: 18/10/2007, 16h41

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo