Code Monkey home page Code Monkey logo

Comments (9)

gkatsev avatar gkatsev commented on September 18, 2024

contrib-ads actually doesn't dictate whether a separate video element is used or not. Both methods are supported.
I believe IMA by default uses a separate video element unless specifically configured not to, which is generally done for iPhone support.

from videojs-contrib-ads.

aakashsingh-maz avatar aakashsingh-maz commented on September 18, 2024

@kevinscroggins-youi I am also facing the same issue on tizen smart TV, did you find any solution ?

from videojs-contrib-ads.

allen8101070 avatar allen8101070 commented on September 18, 2024

Hi, I have the same problem on Tizen TV. Is there any solution?
Thanks!

from videojs-contrib-ads.

kevinscroggins-youi avatar kevinscroggins-youi commented on September 18, 2024

Not that I'm aware of, I did not have any luck. I had limited time to investigate this unfortunately. I also apologize for not responding sooner but I have been unable to comment here for some reason.

from videojs-contrib-ads.

gkatsev avatar gkatsev commented on September 18, 2024

If you have an adblocker, make sure to disable it for contrib-ads, as github's javascript will fail to load due to the repo name.

from videojs-contrib-ads.

kevinscroggins-youi avatar kevinscroggins-youi commented on September 18, 2024

Good to know, but I don't believe that is the issue here since this code is running on a physical Tizen TV. I had attempted a direct integration of IMA into Video.js on Tizen and while I could get CSAI to work for MP4 based content, it would not work for DASH since regardless of how I configured IMA, it would still create multiple video elements which would ultimately conflict with each other. The only solution that I could see working was to tear down the entire player, play the add, then re-start the player but that would require a custom VAST parser, ad scheduling system and API integrations which was not particularly feasible. I may have overlooked something as well, but I have not worked on this in some time so I'm trying to recall from memory. A lot of 'smart' TVs restrict the amount of video elements you can have active and trying to use more than one produces a lot of interesting problems, such as signals from the last created video element coming through on all video elements present in the DOM.. for example when an ad is playing, the player would get playing events since they did not ultimately share the same video element.

from videojs-contrib-ads.

gkatsev avatar gkatsev commented on September 18, 2024

Sorry my comment was specifically about the "I have been unable to comment here for some reason".

While adblocker can cause issues, it's likely unrelated and most TVs don't have adblockers available.

from videojs-contrib-ads.

gkatsev avatar gkatsev commented on September 18, 2024

Are you using videojs-ima? You may want to open an issue there. I know that IMA has options to re-use the existing video element, specifically for iPhones, which you can try, but it may not work on not-an-iphone.

from videojs-contrib-ads.

kevinscroggins-youi avatar kevinscroggins-youi commented on September 18, 2024

Oh! That's hilarious.. I do have an ad blocker actually, and strangely it is working now. 🤷‍♂️ Apologies for the confusion!

I was originally, but I also tried a more direct integration using the IMA SDK directly and ran into a number of issues with that as well. I had passed in the video element of the underlying Video.js player to the AdDisplayContainer and it was still using it's own HTMLVideoElement.

ie.

            self.video = document.createElement("video");
            self.video.id = "videojs_player";

            document.body.appendChild(self.video);

            self.player = videojs(self.video.id, {
                controls: false,
                autoplay: false,
                loadingSpinner: false,
                html5: {
                    nativeTextTracks: false,
                    nativeAudioTracks: true,
                    nativeVideoTracks: false,
                    vhs: {
                        overrideNative: true
                    }
                }
            });
       
            ...
          
            self.adsContainer = document.createElement("div");
            document.body.appendChild(self.adsContainer);

            self.adsDisplayContainer = new google.ima.AdDisplayContainer(self.adsContainer, self.video);
            self.adsDisplayContainer.initialize();

            self.adsLoader = new google.ima.AdsLoader(self.adsDisplayContainer);

I'd also contacted Google directly and the end result was that they don't support Tizen essentially, so there wasn't anything they could do. https://groups.google.com/g/ima-sdk/c/-q9F_7XHNwk/m/XaBOc1xEAQAJ It's a bit hazy now as this was some time ago and is not something I am actively working on anymore and no longer require. I'm not sure I had run into or tried any setting to re-use the video element that I can recall. 🤷‍♂️

In any case I think it's sufficient to say that this issue is more likely to be in the IMA library itself and is not necessarily relevant to this library so you can feel free to close this issue unless you think there is any further action that can be taken.

from videojs-contrib-ads.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.