Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: ui/file_manager/video_player/js/cast/cast_video_element.js

Issue 397813004: Video Player: Add a message which is shown on casting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed the comments Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/file_manager/video_player/js/cast/cast_video_element.js
diff --git a/ui/file_manager/video_player/js/cast/cast_video_element.js b/ui/file_manager/video_player/js/cast/cast_video_element.js
new file mode 100644
index 0000000000000000000000000000000000000000..299fa2bb5d3f1c3740861a3e1ff6379eae9091b6
--- /dev/null
+++ b/ui/file_manager/video_player/js/cast/cast_video_element.js
@@ -0,0 +1,114 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+'use strict';
+
+/**
+ * This class is the dummy class which has same interface as VideoElement. This
+ * behaves like VideoElement, and is used for making Chromecast player
+ * controlled instead of the true Video Element tag.
+ *
+ * @constructor
+ */
+function CastVideoElement() {
+ this.duration_ = null;
+ this.currentTime_ = null;
+ this.src_ = '';
+ this.volume_ = 100;
+}
+
+CastVideoElement.prototype = {
+ __proto__: cr.EventTarget.prototype,
+
+ /**
+ * Returns a parent node. This must always be null.
+ * @return {Element}
+ */
+ get parentNode() {
+ return null;
+ },
+
+ /**
+ * The total time of the video.
+ * @type {number}
+ */
+ get duration() {
+ return this.duration_;
+ },
+
+ /**
+ * The current timestamp of the video.
+ * @type {number}
+ */
+ get currentTime() {
+ return this.currentTime_;
+ },
+ set currentTime(currentTime) {
+ this.currentTime_ = currentTime;
+ },
+
+ /**
+ * If this video is pauses or not.
+ * @type {boolean}
+ */
+ get paused() {
+ return false;
+ },
+
+ /**
+ * If this video is ended or not.
+ * @type {boolean}
+ */
+ get ended() {
+ return false;
+ },
+
+ /**
+ * If this video is seelable or not.
+ * @type {boolean}
+ */
+ get seekable() {
+ return false;
+ },
+
+ /**
+ * Value of the volume
+ * @type {number}
+ */
+ get volume() {
+ return this.volume_;
+ },
+ set volume(volume) {
+ this.volume_ = volume;
+ },
+
+ /**
+ * Returns the source of the current video.
+ * @return {string}
+ */
+ get src() {
+ return this.src_;
+ },
+
+ /**
+ * Plays the video.
+ */
+ play: function() {
+ // TODO(yoshiki): Implement this.
+ },
+
+ /**
+ * Pauses the video.
+ */
+ pause: function() {
+ // TODO(yoshiki): Implement this.
+ },
+
+ /**
+ * Loads the video.
+ */
+ load: function() {
+ // TODO(yoshiki): Implement this.
+ },
+};
« no previous file with comments | « ui/file_manager/video_player/images/200/cast_big.png ('k') | ui/file_manager/video_player/js/video_player.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698