Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

M3U8 url not casting #129

Open
rahul-bangde-persistent opened this issue Jan 5, 2023 · 1 comment
Open

M3U8 url not casting #129

rahul-bangde-persistent opened this issue Jan 5, 2023 · 1 comment

Comments

@rahul-bangde-persistent
Copy link

rahul-bangde-persistent commented Jan 5, 2023

Please find below code and let me know if i need to improve it.

let metadata = GCKMediaMetadata()
        metadata.setString("Title", forKey: kGCKMetadataKeyTitle)
        metadata.setString("Description",
                           forKey: kGCKMetadataKeySubtitle)
        let media = "https://image.service.eu.axinom.net/transform/1ps4il9bhmzdb8fmbml2eljsf-blvdwdf0x2iapb6izcdztvvw2/QtXvVVHBiVmQdTEftUENzq.png?h=360&w=480"
      
        metadata.addImage(GCKImage(url: URL(string: media)!,
                                   width: 480,
                                   height: 360))
        let url = URL.init(string: "https://demo.unified-streaming.com/k8s/features/stable/video/tears-of-steel/tears-of-steel.ism/.m3u8")
        guard let mediaURL = url else {
          print("invalid mediaURL")
          return
        }

        let mediaInfoBuilder = GCKMediaInformationBuilder(contentURL: mediaURL)
        mediaInfoBuilder.streamType = .buffered;
        mediaInfoBuilder.contentType =  "application/x-mpegURL"
        mediaInfoBuilder.metadata = metadata;
        let mediaInformation = mediaInfoBuilder.build()
        if let request = sessionManager.currentSession?.remoteMediaClient?.loadMedia(mediaInformation) {
          request.delegate = self
        }
@rahul-bangde-persistent rahul-bangde-persistent changed the title M3U8 url not working M3U8 url not casting Jan 5, 2023
@MaurizioGugliotta
Copy link

We are having similar issue here for iOS 16. CORS seems unrelated in this case as the android equivalent of our app works correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants