📄 flowplayer.js
字号:
/* * FlowPlayer external configuration file. * * NOTE! This file is only needed if you don't want to include all configuration * in the embedding HTML file. Please see the installation instructions at * http://flowpalyer.org * * Copyright 2005-2008 Anssi Piirainen * * All settings defined in this file can be alternatively defined in the * embedding HTML object tag (as flashvars variables). Values defined in the * object tag override values defined in this file. You could use this * config file to provide defaults for multiple player instances that * are used in a Web site. Individual instances can be then customized * with their embedding HTML. * * Note that you should probably remove all the comments from this file * before using it. That way the file will be smaller and will load faster. */{ /* * Instructs the player to load the configuration from an external config file. * This can be a abosulte URL or a relative url (relative to the HTML page * where the player is embedded). */// configFileName: 'flowPlayer.js', /* * Instructs the player to load the configuration from a RTMP server. * The player connects to the server listening in the address specified * by this URL and calls a method 'getStreamPlayerConfig' that should return a * valid FP configuration object. */// rtmpConfigUrl: 'rtmp://localhost/myapp', /* * A param value to be passed to getStreamPlayerConfig(). A value 'foobar' * will make the player to call getStreamPlayerConfig('foobsr') */// rtmpConfigParam: 'anssi', /* * Name of the video file. Used if only one video is shown. * * Note for testing locally: Specify an empty baseURL '', if you want to load * the video from your local disk from the directory that contains * FlowPlayer.swf. In this case the videoFile parameter value should start * with a slash, for example '/video.flv'. * * See also: 'baseURL' that affects this variable */// videoFile: 'honda_accord.flv', /* * Clip to be used if the file specified with 'videoFile' or any of the clips in the playlist * was not found. The missing video clips are replaced by this clip. This can be * an image or a FLV clip. Typically this will contain an image/video saying * "the video you requested cannot be found.....". * * The syntax for the value is the same is with the clips in a playlist * including the possibility to have start/end and duration properties. * * See also: 'baseURL' that affects this variable */ noVideoClip: { url: 'main_clickToPlay.jpg', duration: 10 }, //noVideoClip: { url: 'MiltonFriedmanonLimi.flv' }, /* * Playlist is used to publish several videos using one player instance. * You can also have images in the playlist. The playback pauses in the * image unless a 'duration' property is given for the image: * * The clips in the playlist may have following properties: * * name: Name for the clip to be shown in the playlist view. If this is * not given, the clip will be hidden from the view. * * url: The URL used to load the clip. * * type: One of 'video', 'flv', 'swf', 'jpg'. Optional, determined from the URL's filename extension * if that is present. 'video' means a video file in any format supported by Flash. * 'flv' is present here for backward compatibility, use 'video' in new FlowPlayer installations * now. Defaults to 'video' if the extension is not present in the URL. * * start: The start time (seconds) from where to start the playback. A nonzero * value can only be used when using a streaming server!! * end: The end time (seconds) where to stop the playback. * * duration: The duration the image is to be shown. If not given the playback * pauses when the image is reached in the list. * * protected: (true/false) Apply inlinine linking protection for this clip? * Optional, defaults to false. * * linkUrl: Associates a hyperlink pointing to the specified URL. The linked * document will be opened to the browser when the clip area is clicked. * Specifying this parameter will replace the normal pause/resume behavior * that is associated to clicking the display area. If you specify an empty * linkUrl '' the pause/resume behavior is disabled but no hyperlink * is created. * linkWindow: Specifies the name of the browser window or frame into which to load * the linked document. Can be a custom name or one of presets: '_blank', * '_parent', '_self', '_top'. (optional, defaults to '_blank') * * controlEnabled: (true/false) Enable transport control buttons for this clip? * Optional, defaults to true. * * allowResize: (true/false) Allow resizing this clip according to the menu selection. * Optional, defaults to true. * * overlay: A filename pointing to an image that will be placed on top of this image clip. This * is only applicable to image clips (jpg or png files). Essentially this layers two images * on top of each other. Typically the image on top is a big play button that is used on * top of an image taken from the main movie. * * overlayId: ID that specifies a built-in overlay to be used. Currently the player supports * one built-in overlay with ID 'play'. It renders a large play button with mouse hover color change. * You can use this on top of image clips (one clip with both the 'url' property and * 'overlayId' property). * You can also specify a clip that only has this ID. In that * case you should place it immediately before or after a FLV clip. This overlay-only * clip is then rendered on top of the first or the last frame of the FLV video. * * live: (true/false) Is this a live stream (played from a media server)? * * showOnLoadBegin: (true/false) If true, make this clip visible when the fist bits have been loaded. * If false, do not show this clip (show the background instead) before the buffer is filled * and the playback starts. Optional, defaults to true. * * maxPlayCount: The maximum play count for this clip. The clip is removed from the playlist when * the playcount reaches this amount. * * suggestedClipsInfoUrl: URL used to fetch suggestions (related videos) information from the server * * See also: 'baseURL' is prefixed with each URL */ playList: [ { url: 'main_clickToPlay.jpg' }, { name: 'Honda Accord', url: '!honda_accord.flv' }, { name: 'River', url: 'river.flv' }, { name: 'Ounasvaara', url: 'ounasvaara.flv' } ], /* * Specifies wether the playlist control buttons should be shown in the player SWF component or not. * Optional, defaults to the value of showPlayList. */ showPlayListButtons: true, /* * Streaming server connection URL. * You don't need this with lighttpd, just use the streamingServer setting (see below) with it. */// streamingServerURL: 'rtmp://localahost:oflaDemo', /* * baseURL specifies the URL that is appended in front of different file names * given in this file. * * You don't need to specify this at all if you place the video next to * the player SWF file on the Web server (to be available under the same URL path). */// baseURL: 'http://flowplayer.sourceforge.net/video', /* * What kind of streaming server? Available options: 'fms', 'red5', 'lighttpd' */// streamingServer: 'fms', /* * Specifies whether thumbnail information is contained in the FLV's cue point * metadata. Cue points can be injected into the FLV file using * for example Flvtool2. See the FlowPlayer web site for more info. * (optional, defaults to false) * * See also: cuePoints below for an alternative way of specifying thumb metadata */// thumbsOnFLV: true, /* * Thumbnails specific to cue points. Use this if you don't want to * embed thumbnail metadata into the FLV's cue points. * If you have thumbNails defined here you should have thumbsOnFLV: false ! * thumb times are given in seconds */// thumbs: [// { thumbNail: 'Thumb1.jpg', time: 10 },// { thumbNail: 'Thumb2.jpg', time: 24 },// { thumbNail: 'Thumb3.jpg', time: 54 },// { thumbNail: 'Thumb4.jpg', time: 74 },// { thumbNail: 'Thumb5.jpg', time: 94 },// { thumbNail: 'Thumb6.jpg', time: 110 }// ], // Location of the thumbnail files// thumbLocation: 'http://www.kolumbus.fi/apiirain/video', /* * 'autoPlay' variable defines whether playback begins immediately or not. * * Note that currently with red5 you should not have false in autoPlay * when you specify a nonzero starting position for the video clip. This is because red5 * does not send FLV metadata when the playback starts from a nonzero value. * * (optional, defaults to true) */ autoPlay: true, /* * 'autoBuffering' specifies wheter to start loading the video stream into * buffer memory immediately. Only meaningful if 'autoPlay' is set to * false. (optional, defaults to true) */ autoBuffering: true, /* * 'startingBufferLength' specifies the video buffer length to be used to kick * off the playback. This is used in the beginning of the playback and every time * after the player has ran out of buffer memory. * More info at: http://www.progettosinergia.com/flashvideo/flashvideoblog.htm#031205 * (optional, defaults to the value of 'bufferLength' setting) * * see also: bufferLength */// startingBufferLength: 5,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -