{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/react-native/issues/6558","repository_url":"https://api.github.com/repos/facebook/react-native","labels_url":"https://api.github.com/repos/facebook/react-native/issues/6558/labels{/name}","comments_url":"https://api.github.com/repos/facebook/react-native/issues/6558/comments","events_url":"https://api.github.com/repos/facebook/react-native/issues/6558/events","html_url":"https://github.com/facebook/react-native/issues/6558","id":142328028,"number":6558,"title":"[Android]Playing videos in webView ","user":{"login":"mobileDevNativeCross","id":3701573,"avatar_url":"https://avatars.githubusercontent.com/u/3701573?v=3","gravatar_id":"","url":"https://api.github.com/users/mobileDevNativeCross","html_url":"https://github.com/mobileDevNativeCross","followers_url":"https://api.github.com/users/mobileDevNativeCross/followers","following_url":"https://api.github.com/users/mobileDevNativeCross/following{/other_user}","gists_url":"https://api.github.com/users/mobileDevNativeCross/gists{/gist_id}","starred_url":"https://api.github.com/users/mobileDevNativeCross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mobileDevNativeCross/subscriptions","organizations_url":"https://api.github.com/users/mobileDevNativeCross/orgs","repos_url":"https://api.github.com/users/mobileDevNativeCross/repos","events_url":"https://api.github.com/users/mobileDevNativeCross/events{/privacy}","received_events_url":"https://api.github.com/users/mobileDevNativeCross/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-21T12:05:41Z","updated_at":"2016-03-21T14:28:46Z","closed_at":null,"body":"Video not play in WebView Android.\r\n`movie.content = \"http://broken-links.com/tests/media/BigBuck.m4v\";\r\nconst HTML = '<video id=\"video\"style=\"background-color:green;\"   autobuffer autoplay height=\"90%\"  width=\"100%\"  preload=\"auto\"  loop webkit-playsinline=\"webkit-playsinline\" controls=\"controls\"><source src=\"'+movie.content+'\" type=\"video/mp4\"/></video>';`\r\n`<WebView\r\n          ref=\"webViewAndroidSample\"\r\n          javaScriptEnabled={true}\r\n            domStorageEnabled={true}\r\n          allowsInlineMediaPlayback={true}\r\n          injectedJavaScript={jsCode}\r\n          html={HTML} />;`"},"comment":{"url":"https://api.github.com/repos/facebook/react-native/issues/comments/199314384","html_url":"https://github.com/facebook/react-native/issues/6558#issuecomment-199314384","issue_url":"https://api.github.com/repos/facebook/react-native/issues/6558","id":199314384,"user":{"login":"pontusab","id":655158,"avatar_url":"https://avatars.githubusercontent.com/u/655158?v=3","gravatar_id":"","url":"https://api.github.com/users/pontusab","html_url":"https://github.com/pontusab","followers_url":"https://api.github.com/users/pontusab/followers","following_url":"https://api.github.com/users/pontusab/following{/other_user}","gists_url":"https://api.github.com/users/pontusab/gists{/gist_id}","starred_url":"https://api.github.com/users/pontusab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pontusab/subscriptions","organizations_url":"https://api.github.com/users/pontusab/orgs","repos_url":"https://api.github.com/users/pontusab/repos","events_url":"https://api.github.com/users/pontusab/events{/privacy}","received_events_url":"https://api.github.com/users/pontusab/received_events","type":"User","site_admin":false},"created_at":"2016-03-21T14:28:46Z","updated_at":"2016-03-21T14:28:46Z","body":"Try this from [Stackoverflow](http://stackoverflow.com/a/17260005/4483457).\r\n\r\nI know from a previous project we did that you need to use the WebChromeClient to get HTML5 video to play. (And this also gives you hardware accelerated support too - providing you also set the flags on your activity).\r\n\r\nUse:\r\n`mainWebView.setWebChromeClient(new WebChromeClient());`\r\n\r\nPut that before you set the setWebViewClient. You can override the WebChromeClient to intercept any events you need to handle.\r\n\r\nAnd in your AndroidManifest.xml within your activity definition, add:\r\n`android:hardwareAccelerated=\"true\"`\r\n\r\nThe following quote is from this [SDK Page](http://developer.android.com/reference/android/webkit/WebView.html) (scroll down to HTML5 Video support)\r\n\r\n> In order to support inline HTML5 video in your application, you need to have hardware acceleration turned on, and set a WebChromeClient.\r\n\r\n"}}