Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

video tag bugs on Android #63

Closed
amdgigabyte opened this issue Apr 24, 2016 · 7 comments
Closed

video tag bugs on Android #63

amdgigabyte opened this issue Apr 24, 2016 · 7 comments

Comments

@amdgigabyte
Copy link
Contributor

amdgigabyte commented Apr 24, 2016

first, src https

<video  src="//cloud.video.taobao.com/play/u/522794875/p/2/e/6/t/1/d/ld/fv/2/23335165.mp4"
             auto-play="true">
</video>

On Android Weex Playground, //cloud.video.taobao.com/play/u/522794875/p/2/e/6/t/1/d/ld/fv/2/23335165.mp4 will cause load failure.

second, video behaviors strange in position:sticky and position:absolute

@amdgigabyte amdgigabyte changed the title video tag src https support video tag src https support on Android Apr 24, 2016
@amdgigabyte amdgigabyte changed the title video tag src https support on Android video tag bugs on Android Apr 24, 2016
@luics luics added the android label Apr 24, 2016
@yuanyan
Copy link
Contributor

yuanyan commented Apr 25, 2016

The default is http or https when start with //?

@zshshr
Copy link
Contributor

zshshr commented Apr 25, 2016

@amdgigabyte Video src must be a complete URL with scheme、host and path,otherwise I can not give the default scheme accurately .

@luics luics assigned zshshr and sospartan and unassigned luics and zshshr Apr 25, 2016
@sospartan
Copy link
Contributor

@yuanyan URL without scheme is considered as a local file path in android , I'll add @zshshr 's suggestion into the doc later.

@amdgigabyte can you post your code here which caused strange behaviors?

@amdgigabyte
Copy link
Contributor Author

@sospartan ok,I will post the code later.Now I think I have implemented the UI interaction in a hacking mode.

@amdgigabyte
Copy link
Contributor Author

amdgigabyte commented May 9, 2016

It is the video and video control panel position mismatch.
I think the bug might be a misuse example of the video tag. When I put a video into a list, the bug occurs.

<template>
    <container>
        <list>
            <cell>
                <container id="videoWrap" class="video-wrap">
                    <video
                           class="video"
                           onpause="onpause"
                           onstart="onstart"
                           onfinish="onfinish"
                           onfail="onfail"
                           src="http://cloud.video.taobao.com/play/u/522794875/p/2/e/6/t/1/d/ld/fv/2/23335165.mp4"
                           auto-play="true">
                    </video>
                </container>
            </cell>
            <cell>
                <text style="width:750px;height:500px;background-color: #999999;">
                    hahahahahahahahahahahahahahahhhshfsjfsjsfjfsjkfsjfjk
                </text>
            </cell>
            <cell>
                <div style="flex-direction: row; justify-content: center;">
                    <image class="banner-image" onclick="{{init}}" src="//gw.alicdn.com/tps/TB1JlSDLFXXXXaBaXXXXXXXXXXX-702-349.jpg"></image>
                </div>
            </cell>
            <cell>
                <text style="width:750px;height:2000px;background-color: #333333;">
                    hahahahahahahahahahahahahahahhhshfsjfsjsfjfsjkfsjfjk
                </text>
            </cell>
        </list>

    </container>
</template>

<style>
    .video-wrap {
        position: absolute;
        width:750px;
        height: 460px;
        transform: translate(0,0) scale(1, 0);
        overflow: hidden;
        top: 0;
        left:0;
        z-index:1;
        margin:0 auto;
        background-color: #000000;
    }
    .video-control {
        position:absolute;
        top:10px;
        right:10px;
    }
    .close-btn {
        color:#ffffff;
        font-size:50px;
    }
    .banner-image {
        width:702px;
        height:350px;
    }
    .video {
        width: 750px;
        height: 460px;
    }
</style>

<script>
    module.exports = {};
</script>

image

@sospartan
Copy link
Contributor

Android's default video player controller is a float window above your app. That cause this behavior.
See http://developer.android.com/reference/android/widget/MediaController.html
It's only for basic use. According your case a customize controller panel is required. I'll put this feature in my schedule. You can send a pull request about it too.

@zshshr zshshr closed this as completed in bd898a3 May 10, 2016
luics pushed a commit that referenced this issue May 16, 2016
* + [all] init

* * [android] remove the IWXRecyclerViewChild interface

* + [android] add navBarSetter interface

* * [android] bug fix of NavBar

* * [android] add weex.jks wee.txt

* * [android]  List  bugfix

* * [android] update WXComponent.java WXListComponent.java IOnLoadMoreListener.java

* * [android] update build.gradle support simple use idk

* * [ android ] fix the toast show mode : one by one mode to replace at once

* * [doc] update integrate-to-android.md

* * [android] modify switch component

* * [android] close #20

* + [android] Add WebView Component and Module

* *[test]Modify android Instrument test case util to ajust 750 width and png file

* + [android ] add navbarsetter

* +[ android ] add navigator function

* - [android] remove Deprecated api

* * [android ] modify imageRecycle Logic

* * [android] update WXcompont.java wxListComponent.java modify appear event

* + [android] text-overflow support

* Revert "Merge branch 'dev' into android"

This reverts commit 967997f, reversing
changes made to d31f74a.

* * [android] update libweexcore.so

* * [android] Refactor border draw

* * [android] ignore iml file create by intellij

* * [android] Refactor border draw

* * [android] update ScreenUtil.java modify the method of get actionbar height

* * [android] update screenUtil.java

* * [android] update WXListComponent.java

* *[android] modify playound add WEEX_TPL_KEY to Unite autotest and QR

* * [android] web tag bugfix

* * [android ] bugfix

* *[ android ] deviceType default phone

* * [android] update WXSDKInstance.java init adapter

* * [android] update wxenvironment.java modify version

* * [doc] add video src URL scheme spec

* * [Android] remove Reuse mechanism in WXListComponent

* * [android] modify scroll default Direction logic

* + [example] instance api

* +[Android] Add refresh and loadMore to "List"
- [Android] Remove reuse view mechanism of "List"

* * [Android] move refresh.we from example to test folder

* * [android] update WXListComponent.java and WXComponent.java modify appear

* * [example] fix video control problem, fix #63 .
  more detail see #134

* * [Android] Fix mis-spelling of "Refresh" tag

* * [example] close instance api example, waiting jsfm merging to dev

* * [doc] add flex-wrap spec

* * [example] add flex-wrap example

* * [Android] No textOverflow will be applied if lines=0

* * [Android] Change grade version to 2.1.0

* * [android] update WXEnvironment.java WXSDKInstance.java CaptureActivity.java dynamic replace bundle js

* * [android] update WXSDKInstance.java modify option np

* +[test] android playground add perf list with append tree testcase

* * [Android] Fix image recycle in List

* * [example] fix flex-wrap title

* * [android] update WXimage.java add new property

* * [android] update WXDomStatement.java null point

* * [example] update playground demos

* * [android] update main.js

* * [android] update WXStreamModule.java

* * [android] update wxattr.java wxrecycleimagemanager.java wximage.java

* * [android] update WXScroller.java stop load image

* * [Android] Destroy useless instance in WXEmbed when src changed

* * [doc] update doc for windows

* * [android] bug fix crash

* + [example] add new-fashion examples

* + [component] add tabbar & navbar

* * [ android ] native crash fixed #210

* + [example] add stream demo

* * [example] add `npm run build` in start script

* * [ android ]  fix list LayoutParams cast error

*  [component] update tabbar & navbar

* * [example] finish stream demo

* * [doc] update image.md add resize attribute

* * [ android ]  fix list LayoutParams cast error

* * [example] post sendHttp

* * [examples] mv params to local

* * [android] set screen h &w cache

* * [example] update text-overflow:elipssis text

* Revert "Merge branch 'dev' into android"

This reverts commit bc35bad, reversing
changes made to d5b5374.

* * [all] restore android merge to dev

* * [android] refresh android for merge branch error

* * [example] update instance api demo

* * [all] fix commit msg regex

* * [android] renew android playground

* * [android] update ImageAdapter.java remove resize

* * [android] update image-demo.we add attribute resize

* * [all] rm build from start script

* *[example] Add showcase for hyperlink("a" element)

* * [example] rename hyperlink

* * [example] add activity example entry

* * [android] update WXEnvironment.java

* * [android] update WXStreamModule.java np

* * [android] update WXSDKInstance.java rename render and add log

* *[android] update jsf 0.13.9

* * [android] so release local reference

* * [example] change href in <a> to external accessible URL

* * [example] add sub-directory supporting comment

* * [example] add dir params

* * [Android] Move flushView from renderStatement and batch to Component.bindImp(), in order to reduce the duplicate flushview when addElement to WXList.

* * [example] update image-demo.we

* * [Android] Remove recursively invoke flushView as bindImp() itself is recursive.

* * [component] fix marquee index

* * [Android] Fix RenderStatement.scrollTo() issuse in single scroller, but this fix will cause the wrong scroll offset when scroller are nested in scroller.

* * [example] panel type

* * [android] input default use single line

* * [Android] Fix scrollTo issues, this will work for single scroller and nested scroller.

* * [example] update playground

* * [android] update WXPageActivity.java modify file path

* add a todoMvc demo with some feature to be finished (#239)

* + [example] add todo mvc basic demo

* + [example] todo more fixed

* + [example] todomvc with bug

* * [example] update android assets

* * [example] need to fix todoMVC

* * [android] update build.grade

* * [example] refactor example structure

* * [Android] Fix flushview no response when image's src has been changed

* * [android] update WXInstanceWrap.java modify pro guard

* +[doc ] add list onappear and ondisappear event doc

* [example] add tabbar demo

* [example] add webview demo

* + [example] add scroller and pull-to-refresh demo (#248)

* + [example] Add appear/disappear event listener in list-basic.

* * [example] move the appear/disappear listener to cell label for Android

* + [example] add scroller-basic demo

* * [example] reindent code

* [example] add navigator demo (#250)

* * [example] update image-demo.we

* + [doc] add pull-to-refresh doc to list component

* * [doc] reference list example to examples/
@WangXiZhu
Copy link

目前我定义了视频容器的宽度和高度,这个panel定位还是在视频的中间部分。虽然是浮动,不知道能不能通过定位的方式,将panel能够较好的放在靠近底部一点。
wx_panel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants