This is an automated email from the ASF dual-hosted git repository.

piotrz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new b004a40  HTML: Add video tag
b004a40 is described below

commit b004a40a6b3a16b7ee7b68f9c099b46f5bb479c9
Author: Piotr Zarzycki <piotrzarzyck...@gmail.com>
AuthorDate: Wed Oct 28 20:33:02 2020 +0100

    HTML: Add video tag
---
 .../HTML/src/main/resources/html-manifest.xml      |  2 +-
 .../org/apache/royale/html/elements/Video.as       | 94 ++++++++++++++++++++++
 2 files changed, 95 insertions(+), 1 deletion(-)

diff --git a/frameworks/projects/HTML/src/main/resources/html-manifest.xml 
b/frameworks/projects/HTML/src/main/resources/html-manifest.xml
index 03b03c0..19ff917 100644
--- a/frameworks/projects/HTML/src/main/resources/html-manifest.xml
+++ b/frameworks/projects/HTML/src/main/resources/html-manifest.xml
@@ -68,6 +68,7 @@
     <component id="Tr" class="org.apache.royale.html.elements.Tr" />
     <component id="U" class="org.apache.royale.html.elements.U" />
     <component id="Ul" class="org.apache.royale.html.elements.Ul" />
+    <component id="Video" class="org.apache.royale.html.elements.Video"/>
 
     <component id="InnerHTML" class="org.apache.royale.html.beads.InnerHTML"/>
     <component id="TextNode" class="org.apache.royale.html.TextNode" />
@@ -115,5 +116,4 @@
     <component id="symbol" class="org.apache.royale.svg.elements.Symbol" />
     <component id="text" class="org.apache.royale.svg.elements.Text" />
     <component id="use" class="org.apache.royale.svg.elements.Use" />
-
 </componentPackage>
diff --git 
a/frameworks/projects/HTML/src/main/royale/org/apache/royale/html/elements/Video.as
 
b/frameworks/projects/HTML/src/main/royale/org/apache/royale/html/elements/Video.as
new file mode 100644
index 0000000..f06e434
--- /dev/null
+++ 
b/frameworks/projects/HTML/src/main/royale/org/apache/royale/html/elements/Video.as
@@ -0,0 +1,94 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.royale.html.elements
+{
+    COMPILE::JS
+    {
+        import org.apache.royale.core.WrappedHTMLElement;
+               import org.apache.royale.html.util.addElementToWrapper;
+    }
+    import org.apache.royale.html.NodeElementBase;
+
+       /**
+        *  The Video class represents an HTML <video> element
+     *  
+        *  
+     *  @toplevel
+        *  @langversion 3.0
+        *  @playerversion Flash 10.2
+        *  @playerversion AIR 2.6
+        *  @productversion Royale 0.9.8
+        */
+       public class Video extends NodeElementBase
+       {
+               /**
+                *  constructor.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion Royale 0.9.8
+                */
+               public function Video()
+               {
+                       super();
+               }
+
+               COMPILE::SWF
+        private var _autoplay:Boolean;
+
+        /**
+         *  Whether the input is autofocused
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion Royale 0.9
+         */
+        public function get autoplay():Boolean
+        {
+            COMPILE::SWF
+            {
+                return _autoplay;
+            }
+
+            COMPILE::JS
+            {
+                return (element as HTMLVideoElement).autoplay;
+            }
+        }
+        public function set autoplay(value:Boolean):void
+        {
+            COMPILE::SWF
+            {
+                _autoplay = value;
+            }
+            COMPILE::JS
+            {
+                (element as HTMLVideoElement).autoplay = value;
+            }
+        }
+
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+                       return addElementToWrapper(this,'video');
+        }
+    }
+}

Reply via email to