doc/integration.en.md
changeset 961 e1baacb52075
parent 960 9a278b9e3b05
child 1076 510fd2a482f4
equal deleted inserted replaced
956:7c1d08cf6956 961:e1baacb52075
    49 To change individual locations or to point to files outside the default directory:
    49 To change individual locations or to point to files outside the default directory:
    50 
    50 
    51     IriSP.libFiles.locations.jQueryUI = "libs/jquery-ui-1.8.16.custom.min.js";
    51     IriSP.libFiles.locations.jQueryUI = "libs/jquery-ui-1.8.16.custom.min.js";
    52     IriSP.libFiles.locations.jwPlayerSWF = "libs/jwplayer/player.swf";
    52     IriSP.libFiles.locations.jwPlayerSWF = "libs/jwplayer/player.swf";
    53 
    53 
    54 ## Configuration of metadata source ##
    54 ## Configuration of a metadata source ##
    55 
    55 
    56 A metadata source is defined by its url and file type (which defines the *serializer* to use).
    56 A metadata source is defined by its url and file type (which defines the *serializer* to use).
    57 
    57 
    58 Example:
    58 Example:
    59 
    59 
    64 
    64 
    65 Metadata sources are then used to configure both the video player and the widgets.
    65 Metadata sources are then used to configure both the video player and the widgets.
    66 
    66 
    67 ## Configuration of the video player ##
    67 ## Configuration of the video player ##
    68 
    68 
    69 The video player is configured through an object having the following properties:
    69 In this version, the video player is now a widget. This section is therefore obsolete
    70 
       
    71 - **metadata**: Metadata source.
       
    72 - **type**: Video player type :
       
    73     - **"jwplayer"**: Uses flash-based jwPlayer, compatible with many video and audio formats, including MP3 audio, MP4 video and RTMP streams.
       
    74     - **"html5"**: Uses the Popcorn.js library to play HTML5 videos. Supported formats : OGG and WebM on Firefox and Chrome, H.264 on Internet Explorer, Safari and Chrome.
       
    75     - **"youtube"**: Uses Popcorn's Youtube plugin.
       
    76     - **"dailymotion"**
       
    77     - **"auto"**: Replaced by *Youtube* or *Dailymotion* for a video hosted on one of these platform, or *jwPlayer* in other cases.
       
    78 - **width** and **height** of the video player.
       
    79 - **video**: Video URL. Optional: If present, it overrides the video URL defined in the metadata source.
       
    80 - Player-specific options, such as **provider** or **streamer** for JwPlayer
       
    81 
       
    82 Example:
       
    83 
       
    84     var playerConfig = {
       
    85         metadata: metadataSource,
       
    86         type: "jwplayer",
       
    87         height: 350,
       
    88         width: 620,
       
    89         provider: "rtmp"
       
    90     };
       
    91 
    70 
    92 ## User Interface Configuration ##
    71 ## User Interface Configuration ##
    93 
    72 
    94 L’interface se configure par un objet GUI, contenant les propriétés suivantes:
    73 The interface is configured with the following properties:
    95 
    74 
    96 - **container**: l’ID de l’élément HTML dans lequel le player sera instancié.
    75 - **container**: ID of the DOM element in which the metadataplayer will be instantiated.
    97 - **width** et **height**: largeur et hauteur de l’interface (*height* est optionnel).
    76 - **width** et **height**: width and height of the interface (*height* is optional).
    98 - **default\_options**: des options de configuration communes à tous les widgets, par exemple, comme ci-dessous, une source de métadonnées communes.
    77 - **default\_options**: Configuration options that will be passed to all widgets. In the example below, all widgets will connect to the same metadata source.
    99 - **css**: l’URL du fichier CSS de base (LdtPlayer-core.css)
    78 - **css**: The URL of the base CSS stylesheet (LdtPlayer-core.css)
   100 - **widgets**: la liste des widgets, sous la forme [ { type: *Type du widget*, option_1: *Valeur de l’option 1* } ]. Pour les options des widgets, se référer au document *Architecture générale*
    79 - **widgets**: A list of widgets, in the following format: [ { type: *Widget type*, option_1: *Option 1 value* } ]. For widget options, please refer to the *general architecture* document
   101 
    80 
   102 Exemple:
    81 Exemple:
   103 
    82 
   104     var guiConfig = {
    83     var config = {
   105         container : "Metadataplayer",
    84         container : "Metadataplayer",
   106         default_options: {
    85         default_options: {
   107             metadata: metadataSource
    86             metadata: metadataSource
   108         },
    87         },
   109         css : "metadataplayer/css/LdtPlayer-core.css",
    88         css : "metadataplayer/css/LdtPlayer-core.css",
   110         widgets: [
    89         widgets: [
       
    90             {
       
    91                 type: "AutoPlayer"
       
    92             },
   111             {
    93             {
   112                 type: "Slider"
    94                 type: "Slider"
   113             },{
    95             },{
   114                 type: "Controller",
    96                 type: "Controller",
   115                 disable\_annotate\_btn: true
    97                 disable\_annotate\_btn: true
   121                 container: "AnnotationsListContainer"
   103                 container: "AnnotationsListContainer"
   122             }
   104             }
   123         ]
   105         ]
   124     };
   106     };
   125 
   107 
   126 ## Instanciation du player ##
   108 ## Player instanciation ##
   127 
   109 
   128 Le player s’instancie en créant un objet de type **IriSP.Metadataplayer**.
   110 The metadataplayer is instantiated by creating an object of class **IriSP.Metadataplayer**.
   129 
   111 
   130 Exemple:
   112 Exemple:
   131 
   113 
   132     var config = {
   114     var myPlayer = new IriSP.Metadataplayer(config);
   133         player: playerConfig,
       
   134         gui: guiConfig
       
   135     };
       
   136     var monPlayer = new IriSP.Metadataplayer(config);