Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jplayer full screen

Tags:

jquery

jplayer

how can i detect jplayer is on full screen mode?

like image 900
tetris Avatar asked Jan 18 '23 00:01

tetris


2 Answers

The jplayer adds a class of jp-video-full to the div when full screen.

You can use that selector for whatever you're trying to achieve.

if ($("#jp_container_1").hasClass("jp-video-full")) {
    //do something
} else {
   //do something else
}
like image 80
Christopher Marshall Avatar answered Jan 29 '23 01:01

Christopher Marshall


ok, this is how i had to go:

  $("a.jp-full-screen").click(function(){

  if($(this).attr("title")=="full screen"){
         $(".hover, ul#navigation").hide()
  }
  })


  $("a.jp-restore-screen").click(function(){
     if($(this).attr("title")=="restore screen"){
         $(".hover, ul#navigation").show()
  }
 })
like image 21
tetris Avatar answered Jan 29 '23 01:01

tetris