0

I'm looking to make a packaged app for Chrome OS which can run videos in fullscreen. The videos are hosted online, and are loaded through a webview. Upon trying to fullscreen the video, it flashes for a brief moment to the full size of the window, and returns to a regular size. Upon defining the "fullscreen" permission, my IDE warns me saying it does not exist. Any advice?

manifest.json:

{
  "manifest_version": 2,
  "name": "Browser Sample",
  "minimum_chrome_version": "43.0.2357",
  "version": "2.1",
  "icons": {
    "16": "icon_16.png",
    "128": "icon_128.png"
  },
  "app": {
    "background": {
      "scripts": ["main.js"]
    }
  },
  "permissions": [
    "webview",
    "notifications",
    "contentSettings",
    "fullscreen",
  ]
}

index.html:

<!DOCTYPE html>
<html>
  <body>
    <webview src="https://www.youtube.com/">
    </webview>
  </body>
</html>
alfonsojon
  • 71
  • 6
  • Which version of chrome are you running? – lazyboy May 28 '15 at 19:14
  • I am using Chrome 43 – alfonsojon May 29 '15 at 12:11
  • OK, does http://stackoverflow.com/questions/29700222/cant-fullscreen-html5-videos-in-chromes-webview help? – lazyboy May 29 '15 at 16:25
  • I don't know how to implement that eactly; I don't know Javascript, which is probably important.... would I put that within my index.html, or main.js file? – alfonsojon May 30 '15 at 03:32
  • You need to put that in a JavaScript that runs as part of your app, i.e. index.html, then you'd grab the webview element by sth like "document.querySelector('webview')" and allow fullscreen permission for that element. – lazyboy Jun 01 '15 at 06:09
  • Could I ask for a code example? I don't know any JavaScript, so I don't know how to adapt that to work with the provided code. – alfonsojon Jun 01 '15 at 06:47
  • Sure, here's a simple one: https://github.com/lazyboy/chromium/tree/master/tests/chrome-apps/webview_fullscreen_simple – lazyboy Jun 02 '15 at 16:34
  • Hi, **really** late comment. Here is the code from the site to trigger fullscreen; implementing the code you added seems to not work. Fullscreen is triggered via Javascript on this site. http://hastebin.com/mezunaxilu.coffee – alfonsojon Oct 17 '15 at 04:22

0 Answers0