googleads-ima-html5 icon indicating copy to clipboard operation
googleads-ima-html5 copied to clipboard

Need help making it work without a "Play" button

Open mozillr opened this issue 1 year ago • 7 comments

Hi

so the thing i have in here https://googleads.github.io/googleads-ima-html5/simple/ need user to click on "Play" so vast would load and play on video player before playing video.

Untitled

Is there any way so vast ad would just load (preroll one) by clicking on play button of player itself? If there is please make a change to that code and send it here i'm really not good with coding and if it's not possible thank you for your great work anyway.

mozillr avatar Jan 12 '24 09:01 mozillr

Hello @mozillr ,

If you look at the advanced sample app, this sample includes a player play button that triggers ad playback.

Please let me know if you have any follow-up questions.

Thank you, Jackson IMA SDK team

Kiro705 avatar Jan 12 '24 15:01 Kiro705

Hello @mozillr ,

If you look at the advanced sample app, this sample includes a player play button that triggers ad playback.

Please let me know if you have any follow-up questions.

Thank you, Jackson IMA SDK team

in that one i need to put vast url in tag box. i need one version where i just change the vast url in the code and from that moment it plays in first of video.

mozillr avatar Jan 12 '24 16:01 mozillr

Hello @mozillr ,

Instead of using the advanced example as is, you should update it to use an ad tag URL of you choosing. That could be done on this line. You can also remove the portion of the advanced example that includes the input box for ad tags.

Let me know if I can help with anything else.

Thank you, Jackson IMA SDK team

Kiro705 avatar Jan 16 '24 16:01 Kiro705

Hello @mozillr ,

Instead of using the advanced example as is, you should update it to use an ad tag URL of you choosing. That could be done on this line. You can also remove the portion of the advanced example that includes the input box for ad tags.

Let me know if I can help with anything else.

Thank you, Jackson IMA SDK team

Maybe I'm not explaining it really good let me try again.

I need the vast to play when I can on play button of player itself. not a button under player, not a button on player. something like this https://googleads.github.io/videojs-ima/examples/simple/ but without videojs player, only the html5 player itself.

Miakhan8887 avatar Jan 19 '24 06:01 Miakhan8887

Hello @Miakhan8887 ,

The player set up you are talking about should be possible with the IMA HTML5 SDK (without the VideoJS-plugin).

Do you think you could share a code sample for your integration, and I could help if there are any issues you are running into?

Thank you, Jackson IMA SDK team

Kiro705 avatar Jan 19 '24 16:01 Kiro705

Hello @Miakhan8887 ,

The player set up you are talking about should be possible with the IMA HTML5 SDK (without the VideoJS-plugin).

Do you think you could share a code sample for your integration, and I could help if there are any issues you are running into?

Thank you, Jackson IMA SDK team

to be honest i have nothing from my self but I got this from https://googleads.github.io/videojs-ima/examples/simple/ and the problem is when i delete any videojs style or js file whole thing crashes. so can you unvideojs it for me?

<html>
  <head>
    <title>Video.js Test</title>
    <link rel="stylesheet" href="https://googleads.github.io/videojs-ima/examples/style.css" />
    <link rel="stylesheet" href="https://googleads.github.io/videojs-ima/node_modules/video.js/dist/video-js.min.css">
    <link rel="stylesheet" href="https://googleads.github.io/videojs-ima/node_modules/videojs-contrib-ads/dist/videojs.ads.css" />
    <link rel="stylesheet" href="https://googleads.github.io/videojs-ima/dist/videojs.ima.css" />
  </head>

  <body>
    <video id="content_video" class="video-js vjs-default-skin"
        poster = "../posters/bbb_poster.jpg" controls preload="auto" width="640"
        height="360">
      <source src="//commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
          type="video/mp4" ></source>
    </video>
    <script src="//imasdk.googleapis.com/js/sdkloader/ima3.js"></script>
    <script src="https://googleads.github.io/videojs-ima/node_modules/video.js/dist/video.min.js"></script>
    <script src="https://googleads.github.io/videojs-ima/node_modules/videojs-contrib-ads/dist/videojs.ads.min.js"></script>
    <script src="https://googleads.github.io/videojs-ima/dist/videojs.ima.js"></script>
    <script src="https://googleads.github.io/videojs-ima/examples/simple/ads.js"></script>
  </body>
</html>

Miakhan8887 avatar Jan 19 '24 16:01 Miakhan8887

Hello @Miakhan8887 ,

I would not recommend using the videoJS examples, if your goal is to remove the videoJS-IMA integration. Instead it may be more useful to you to use one of the samples in this GitHub repository.

For more information on using the IMA SDK, I would recommend looking at the HTML5 getting started guide.

Unfortunately, If you have specific design requirements, I cannot offer help for how to set up your app outside of your IMA SDK integration.

Please let me know if you have any additional questions.

Thank you, Jackson IMA SDK team

Kiro705 avatar Jan 22 '24 15:01 Kiro705