I have code like this:
setContentView(R.layout.webview);
webView = (WebView) findViewById(R.id.webView);
webView.getSettings().setJavaScriptEnabled(true);
webView.loadUrl("https://www.youtube.com/watch?v=_Z5-P9v3F8w");
It'll show the youtube video with the Play button, but none of the Glass gesture can make the video play. Any ideas? Thanks!
To view the video in your timeline, swipe forward on the touchpad from the Home screen. Glass will make a collage out of pictures, videos, and vignettes taken during a day and bundle them together. Tap into the bundle to browse and then on a video to play the video.
Just two years after they were launched, Google announced they would no longer be producing a consumer version of the glasses.
Glass Enterprise can connect you with coworkers in an instant, bringing expertise to right where you are. Invite others to “see what you see” through a live video stream so you can collaborate and troubleshoot in real-time.
Finally figured out how to play Youtube video on Glass!
Intent i = new Intent();
i.setAction("com.google.glass.action.VIDEOPLAYER");
i.putExtra("video_url", "https://m.youtube.com/watch?v=5bWSgFnoCOk");
startActivity(i);
Using WebView can't play the video, using VideoView can only play local MP4 or streaming MP4 (there's some way to hack the MP4 link for a Youtube video, but not reliable). Also, using VideoView can only pause/play the video, but not fast forward or backward. Using the com.google.glass.action.VIDEOPLAYER above solves all the problems WebView and VideoView have.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With