Sha256: 90afc612a56b865e6bff8a963032d878b26524e344c5bc7d4ad7a0ab2c863090

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

Contents

var io = new CometIO().connect();
var screen = new MultiScreen(io, {type: "remote", channel: channel});
var tv = screen.tv;

io.on("connect", function(session){
  console.log("connect!! "+session);

  $("#btn_search").click(function(e){
    var word = $("#text_search").val();
    tv.$("#text_search").val(word);
    tv.$("#btn_search").click();
  });

  $("#text_search").keyup(function(e){
    var word = $("#text_search").val();
    console.log(word);
    tv.$("#text_search").val(word);
  });

  $("#btn_play").click(function(e){
    tv.$("#btn_play").click();
  });

  $("#btn_seek").click(function(e){
    tv.$("#btn_seek").click();
  });
  $("#btn_seekback").click(function(e){
    tv.$("#btn_seekback").click();
  });

  var range_seek = $("#range_seek");
  range_seek.change(function(e){
    tv.$("#range_seek").val( range_seek.val() );
    tv.$("#range_seek").change();
  });

  tv.on("seek", function(time){
    $("#text_seek").val(time);
    range_seek.val(time);
  });

  tv.on("get_duration", function(duration){
    range_seek.attr("max", duration);
  });
});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sinatra-multi-screen-0.0.2 sample/public/js/remote.js