Play Audio/Sound on Web AR (Model-Viewer) on an HTTPS Website? - augmented-reality

I created a web AR demo (Android Chrome) with a sound file attached. The AR with the sound works on an HTTP website, but not on HTTPS. It seems that HTTPS requires user interaction to do so. I just wonder how Google did this with their AR animals (i.e. search for "Tiger" in Google and use the AR button). Unfortunately, there is no documentation on their website about the audio implementation.
How can I get this working on an HTTPS website?
<model-viewer src="assets/my3DModel.glb?sound=assets/mySound.ogg"...
Development Source: https://modelviewer.dev

Related

Youtube autoplay on mobile with WiFi

So I understand based on the Youtube API docs as well as a few related questions here on Stackoverflow that auto-play is not allowed for embedded media on Safari/Chrome on mobile devices. The rationale is to ensure unsolicited downloads don't happen over cellular networks. But if a user is on Chrome in a mobile device but is on Wi-Fi (which a lot of users are on typically), this restriction of disallowing autoplay seems to still exist via the Youtube iframe API. Why is this the case? Perhaps there is something I am missing. Appreciate any advice/pointers. I was hoping to achieve auto-play on mobile web if user is on WiFi.
Actually it's not Youtube's Restrictions, it's (was) Apple's.
New Policies for iOS
You just need to add the correct html tag and attribute and it works on newer devices.

Tracking Hybrid Apps with Google Analytics

I have an app with some native screens and some additional content I load via UIWebView. I am trying to track both native and web content into the same google analytics account. I'm able to create an account that tracks web and I can create a separate account that tracks the native screens. How can I combine this tracking into a single account?
Track web code using ga.js and native code using GA iOS SDK
You should have a UA account ID of the sort "UA-xxxxxxxx". If you use this
same Analytics tracking ID across your web app & native iOS app, all your data will end up in the same Google Analytics bucket. Obviously, you'll have to use the javascript library in your web app and native SDK in your iOS app.
Alternative Solution (I dont really recommend this)
You can you have your web app pipe in your GA events into your iOS app. How I did this in the past was like so.
I created a special GA codes like myapp://ga-pageview/<pagename> and myapp://ga-event/event_category/event_name.
Use the UIWebViewDelegate method webView:shouldStartLoadWithRequest:navigationType: to intercept these "special" urls and do the GA callback natively.
In the web app, whereever you need you need call a GA event, create an iframe with the myapp://ga-* url scheme above. Then remove that iframe.

Service to host streaming videos for mobile access where urls are not trackable

I'm building an iOS app and Android app that will display a series of private videos. Someone will purchase the app for x amount and then have access to the videos through that app only.
I already know a couple of ways to do that part. But the real trick is hiding the video urls to traffic sniffers/etc. I don't want anyone to be able to detect the video urls, or at least the endpoint will reject a request without an auth token.
So I could build my own Node/Express server, incorporate wowza maybe with Amazon to store the files - but that is a lot of work.
So what is the simplest solution to stream my videos to mobile without people being able to load up the videos outside of the app?
It looks like you'll need to implement some sort of authentication system, so that even if they get the video url somehow, they will be unable to view it without the authentication key.
Your videos should be hosted in a directory on your server that is inaccessible from the web. Then use some sort of index page which takes a parameter for the video ID and does the authentication before serving up the video file contents.

Is there an API for sending Youtube links to the Youtube applications on Tivo/Smart TVs?

I'm having trouble finding documentation on Youtube's developer website whether there is an API for "Youtube for Devices" to send videos to set top boxes like the newer Tivos and similar players.
There is a feature in the Android app that allows a Youtube video to be played via the Tivo when you hit a button, similar to Chromecast.
I thought it might share an API with Chromecast in some way, but I tried the Chromecast extension on Google Chrome for Windows and it failed to detect the Tivo.
Is there an API for this, or is it a proprietary feature of the Youtube app?

What is advantage of embedding HTTP server in iOS app?

In linked in implementation, they have HTTP server implemented in iOS app. What could be the reason behind this architecture, if uiwebview already handles the HTML loading and rendering.
I don't think they have a HTTP server embedded as much as they are just making very liberal use of UIWebView and the features of HTML5.
And the benefits of doing this are that they only have to write a relatively general implementation of the LinkedIn mobile interface in HTML5 and those changes get carried across to iOS, Android, Windows Mobile, and whatever other mobile platforms support HTML5.
I have a couple of apps with an embedded HTTP server. This is used as one possible method for importing/exporting data to/from the app. The user connects to the app from their computer's web browser to the server on their iOS device. The user can then download a file from or upload a file to the app. I added this feature before iOS supported file sharing via iTunes and the Documents directory. It's now one of several ways to get data to/from the app.

Resources