Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8550731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:01:15+00:00 2026-06-11T14:01:15+00:00

The Flash YouTube API getPlayerState() method has 6 possible values: -1 (unstarted) 0 (ended)

  • 0

The Flash YouTube API getPlayerState() method has 6 possible values:

  • -1 (unstarted)
  • 0 (ended)
  • 1 (playing)
  • 2 (paused)
  • 3 (buffering)
  • 5 (video cued).

The manual reads:

When the player first loads a video, it will broadcast an unstarted
(-1) event. When a video is cued and ready to play, the player will
broadcast a video cued (5) event. In your code, you can specify the
integer values or you can use one of the following namespaced
variables.

Consider this:

  1. The player is CUED waiting for user interaction.
  2. User clicks play
  3. Pre-roll video ad starts to play

What state is the player in during the pre-roll ad? How do I know an ad is being played?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T14:01:16+00:00Added an answer on June 11, 2026 at 2:01 pm

    I did the legwork for you at https://developers.google.com/youtube/youtube_player_demo

    Cuing a video with a preroll and then clicking Play leads to:

    1. onStateChange event: Player state changed to: “-1” (undefined)
    2. cueVideoById(cggNqDAtJYU, parseInt(0), default);
    3. onStateChange event: Player state changed to: “5” (video cued)
    4. onStateChange event: Player state changed to: “2” (paused)

    So the video’s state is PAUSED (2) while the ad is playing. Additionally, calls to playVideo() or pauseVideo() will be no-ops during a preroll.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to use Flash JavaScript API with YouTube videos? The only function
I want to embed some youtube videos at my site using Video.Flash helper. Microsoft.Web.Helpers
I have an embeded youtube video which I want the YouTube API applied. I
I am trying to implement a Flash YouTube video player on this page .
I am playing an embeded youtube video with the play() function. This is all
In video gallerys YouTube shows images of the videos instead of the flash player.
Since I don't have a flash player to play the video from Youtube itself,
I'm developing a flash thingy that connects to the youtube api. The website that
Regarding the Youtube API Blog they are experimenting with their new HTML5 Video Player.
On a page with an embedded Flash video (from YouTube in an <iframe/> ),

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.