I am following the directions here:
https://github.com/googlecast/CastMediaPlayerStreamingDRM
In order to understand how I can stream DRM videos with m3u8 to Google ChromeCast (from iOS).
Under 'Steps to setup'. The 3rd step says
Point your receiver app URL in Developer Console to
localhost/~username/CastMediaPlayerStreamingDRM/mpl.html
I don't know what my 'receiver app url' is. Is that referring to ?
http://url.of.chromecast.72:9222
Is this the URL you setup when you are at https://cast.google.com/publish/#/overview and you select "Add new application" of type "Custom Receiver". Then under Receiver details you are allowed to put in a 'URL'?
And for 'developer console' - I assume it's referring to?
https://cast.google.com/publish/#/overview
Developer console is where you had pointed to. The receiver URL is the one you had guessed; when you create a custom receiver, you need to specify where the receiver code is to load it from and you need to point it to wherever you are serving your receiver page at.; it has nothing to do with the chromecast ip/url.
Related
I have a Chrome app that I created with "Create Application Shortcut".
What I need is to open that app with specific url on the same domain.
Example:
chrome_proxy.exe --profile-directory=Default --app-id=xxxxxxxx "https://www.google.com"
Is that possible or any command that achive the same result?
I'm guessing you installed the Chrome app so that the website launches in a standalone window. If this is the case, you can achieve something similar by using the --app command line switch instead.
Eg: chrome_proxy.exe --profile-directory=Default --app="https://www.google.com"
This doesn't strictly open the URL in the existing app, but it does open that specific URL in a standalone window.
Here's the answer what you are looking for.
chrome_proxy.exe --profile-directory=Default --app-id=xxxxxxxx --app-launch-url-for-shortcuts-menu-item="https://youtu.be/dQw4w9WgXcQ"
Using this will work:
chrome_proxy.exe --profile-directory=Default --app-id=xxxxxxxx --app-launch-url-for-shortcuts-menu-item="https://youtu.be/dQw4w9WgXcQ"
It will launch in the special standalone window AND navigate to the specified URL.
Replace xxxxxxxx with the app id (this can be found if you look at the properties of the shortcut it created), but after you create the app this part should already be filled in.
At that point all you need to add is this part:
--app-launch-url-for-shortcuts-menu-item="https://youtu.be/dQw4w9WgXcQ"
Replacing the https://youtu.be/dQw4w9WgXcQ part with the full URL of where you would like to navigate to.
Documentation of the argument can be found here.
Credit due in part to 김보근.
I would like to add text to my app so when ever I want to change the text in Xcode, the text will also change for the user. From my understanding so far, if I want to change a UILabel, I would have to submit it to the AppStore again and the user would have to update the app in order to see the UILabel text change.
Is it possible for me to add text on the app when ever I want and it will update for the user automatically?
First you should consider the solution, that will be connecting your app to certain API service.
In other words, the service that will bring fresh data to your app, will be an API, that your code will connect to. After connection and getting response from server, data from it will be transferred to the user interface of your application.
For example - your code will be set to make requests from your app using URL, looking like this:
http://example.com/api/request/?id=100
For better imagination, if you would like to check, what this URL returns, you would type that URL to your browser. It would return some output - for example JSON, something like this:
{"label": "This is title"}
So your app (after some action, for example when a view is shown or a user taps a button) will establish connection to this URL, to be able to get this output and process it. So it will await some structure, that is needed to read by your program. In this case, the structure is a format of an output, that is JSON.
Then, your code will parse this output and gets result. So the result would be "This is title" and your UILabel would be updated with "This is title".
For URL connections and sessions, using swift3, the best choice to use is an Alamofire framework:
https://github.com/Alamofire/Alamofire
And this is very useful tutorial:
https://www.raywenderlich.com/121540/alamofire-tutorial-getting-started.
It explain, how to get an access to a service, that is capable to prepare your output (e.g. JSON), because your app will need to connect to it.
This tutorial is a solid guide, how to create a service like that.
You have to implement web services for this where your app will read data from some server, programmatically. And using this you can update your any type of data. I would suggest to read more about Objective C Basic, Web services, AFNNetworking, NSURLSession and all.
I'm trying to upload data using NSURLSession with a background task from an OSX share extension.
As soon as I start the task, by delegate is called back with the world's least helpful error message:
The operation couldn’t be completed. (NSURLErrorDomain error -995.)
There's no other information in the NSError object, nor in the console.
After scouring the internet, the only clue I have is to make sure that I've set up the configuration.sharedContainerIdentifier correctly, however I've already done that:
let configuration = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier(uniqueId)
configuration.sharedContainerIdentifier = Config.appGroupName
urlSession = NSURLSession.init(configuration: configuration, delegate: self, delegateQueue: nil)
I then prepare the request and create the task:
let task = self.urlSession!.dataTaskWithRequest(request)
self.tasks.append(task)
task.resume()
Note that everything works perfectly when from my main app. It's just the sharing extension that fails.
What other problems could cause error -995?
(Bear with me, I don't have rep yet for a comment so I have to answer, and notwithstanding the possibility you've found a bug, the last part I'm adding might help others)
When you're using an NSURLSession any background upload/download that completes will launch your main application. This is detailed in the Common Scenarios page.
As you show you've done, you need to set the NSURLSessionConfiguration with a sharedContainerIdentifier:
let configuration = NSURLSessionConfiguration.backgroundSessionConfigurationWithIdentifier(uniqueId)
configuration.sharedContainerIdentifier = Config.appGroupName
urlSession = NSURLSession.init(configuration: configuration, delegate: self, delegateQueue: nil)
You also need to ensure that both your app extension and your main app are all triple-checked in the 'App Groups' option in Xcode (I'm looking at Xcode 8.1), which means:
The app group name is the same for both app and extension(!)
the check beside Add the App Group entitlements in the entitlement file
the check beside Add the App Groups feature to your App ID
the check beside Add App Groups to your App ID
And the checks need to be there on both app and extension.
I'm a bit rusty on adding these but my recollection is these aren't listed in the right order, e.g. you have to 'Add App Groups to your ID' before you can check them in both app and extension, but I could be wrong.
Advanced - Thirdparty libraries in app extensions.
Looking at the github project nst/STTwitter, a third-party Twitter REST library, they needed to add a configurable group ID to allow setting the NSURLSessionConfiguration sharedContainerIdentifier to the library user's group ID.
I may again be mistaken but this seems like it would be a general problem when using thirdparty libraries in an app extension - e.g. I've just now come across this error when trying to use the ChromeCast SDK and this could be the kick in the pants.
I just started using Chromecast SDK today and got bit confused with its APIs and samples given in the web.
What I am trying to do is to send some messages to the Chromecast so it will display them on the big screen. I am going to use Chrome API with HTML5/JS/CSS.
Most examples (https://github.com/pjjanak/chromecast-hello-world/blob/master/sender/index.html , http://nerdwin15.com/2013/10/chromecast-development-part-one-chrome-sender/) in the web uses new Cast.Api() in the sender and uses an Activity in doing so. But I could not find a reference to a Cast.Api in the Chrome API. Most Google references deal with Media and I am not sure whether I have to use them. So to sum up, following are the questions I have (Sorry! I did read the API and developer guide but I am still clueless).
Do I have to write a custom receiver to show text on TV screen. Can't I survive default receiver, chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID
Is handling multimedia files different from displaying text on the Chromecast or can I set the mime type to text/html and send a text stream (doesn't work for me at the moment)
Are those examples on the web uses a deprecated way of sending data to chromecast?
Thanks in advance,
Ish
Ok I think I found the answer from following documents,
https://developers.google.com/cast/docs/receiver_apps
https://github.com/googlecast/CastHelloText-chrome/blob/master/chromehellotext.html
Will try them and let you all know!
Following example page is very useful for anyone who try writing chromecast apps
https://github.com/googlecast
I'm not sure how you fared, but here are some quick responses to your questions.
Yes, you have to write a custom receiver if you want to do anything other than sending images, audio, or video to the Chromecast. You can see a list of supported media Default Media Receiver here: https://developers.google.com/cast/docs/media
Yes (see above), it requires a custom receiver, which will also require your own appId and I'm pretty sure a custom namespace.
To my knowledge, all of the examples up on https://github.com/googlecast should be relevant, but I am working on a few wrappers to try to simplify getting up and running with custom Chrome Sender and Receiver apps. You can check them out here: https://github.com/googlecast Let me know if those help, and if you have any feedback to share.
I hope you've already figured all this stuff out, but if not hopefully this is useful.
when compilear the Google example I can't get the authorization to create a game room.
All is ok in the Google console. The constants file have my app Id. What's is missing?
In the file Constants.h
// Update the following value with your Client ID, // Refer
https://developers.google.com/games/services/console/enabling#d_gather_credentials_for_authentication_and_authorization
for more information //
define CLIENT_ID #"REPLACE_ME" //<----------------- HERE
And change
change the Bundle Identifier from com.example.ButtonClicker to
something appropriate for your Provisioning Profile. (It will probably
look like com..ButtonClicker)