source: OpenRLabs-Git/web2py/applications/rlabs/static/js/guacamole-common-js/modules/VideoPlayer.js

main
Last change on this file was 42bd667, checked in by David Fuertes <dfuertes@…>, 4 years ago

Historial Limpio

  • Property mode set to 100644
File size: 3.7 KB
Line 
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements.  See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership.  The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License.  You may obtain a copy of the License at
9 *
10 *   http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied.  See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20var Guacamole = Guacamole || {};
21
22/**
23 * Abstract video player which accepts, queues and plays back arbitrary video
24 * data. It is up to implementations of this class to provide some means of
25 * handling a provided Guacamole.InputStream and rendering the received data to
26 * the provided Guacamole.Display.VisibleLayer. Data received along the
27 * provided stream is to be played back immediately.
28 *
29 * @constructor
30 */
31Guacamole.VideoPlayer = function VideoPlayer() {
32
33    /**
34     * Notifies this Guacamole.VideoPlayer that all video up to the current
35     * point in time has been given via the underlying stream, and that any
36     * difference in time between queued video data and the current time can be
37     * considered latency.
38     */
39    this.sync = function sync() {
40        // Default implementation - do nothing
41    };
42
43};
44
45/**
46 * Determines whether the given mimetype is supported by any built-in
47 * implementation of Guacamole.VideoPlayer, and thus will be properly handled
48 * by Guacamole.VideoPlayer.getInstance().
49 *
50 * @param {String} mimetype
51 *     The mimetype to check.
52 *
53 * @returns {Boolean}
54 *     true if the given mimetype is supported by any built-in
55 *     Guacamole.VideoPlayer, false otherwise.
56 */
57Guacamole.VideoPlayer.isSupportedType = function isSupportedType(mimetype) {
58
59    // There are currently no built-in video players (and therefore no
60    // supported types)
61    return false;
62
63};
64
65/**
66 * Returns a list of all mimetypes supported by any built-in
67 * Guacamole.VideoPlayer, in rough order of priority. Beware that only the core
68 * mimetypes themselves will be listed. Any mimetype parameters, even required
69 * ones, will not be included in the list.
70 *
71 * @returns {String[]}
72 *     A list of all mimetypes supported by any built-in Guacamole.VideoPlayer,
73 *     excluding any parameters.
74 */
75Guacamole.VideoPlayer.getSupportedTypes = function getSupportedTypes() {
76
77    // There are currently no built-in video players (and therefore no
78    // supported types)
79    return [];
80
81};
82
83/**
84 * Returns an instance of Guacamole.VideoPlayer providing support for the given
85 * video format. If support for the given video format is not available, null
86 * is returned.
87 *
88 * @param {Guacamole.InputStream} stream
89 *     The Guacamole.InputStream to read video data from.
90 *
91 * @param {Guacamole.Display.VisibleLayer} layer
92 *     The destination layer in which this Guacamole.VideoPlayer should play
93 *     the received video data.
94 *
95 * @param {String} mimetype
96 *     The mimetype of the video data in the provided stream.
97 *
98 * @return {Guacamole.VideoPlayer}
99 *     A Guacamole.VideoPlayer instance supporting the given mimetype and
100 *     reading from the given stream, or null if support for the given mimetype
101 *     is absent.
102 */
103Guacamole.VideoPlayer.getInstance = function getInstance(stream, layer, mimetype) {
104
105    // There are currently no built-in video players
106    return null;
107
108};
Note: See TracBrowser for help on using the repository browser.