Skip to content

Commit

Permalink
progress bar replaces with mplayer
Browse files Browse the repository at this point in the history
  • Loading branch information
antulik committed Aug 24, 2014
1 parent 65f4c87 commit 5e7ebb6
Show file tree
Hide file tree
Showing 5 changed files with 573 additions and 36 deletions.
26 changes: 24 additions & 2 deletions main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def supervisor
#pause, resume, stop, scrub, info, seek
end

get '/info' do
get '/backbone_info' do
content_type :json

if $media_box.player && (!$media_box.player.alive? || $media_box.player.stopped?)
Expand All @@ -74,7 +74,29 @@ def supervisor
{}
end

info.to_json
# info
#
# {"duration":134.97666931152344,
# "loadedTimeRanges":[
# {"duration":7.535599546,"start":32.422733787}
# ],
# "playbackBufferEmpty":true,
# "playbackBufferFull":false,
# "playbackLikelyToKeepUp":true,
# "position":32.92290115356445,
# "rate":1.0,
# "readyToPlay":true,
# "seekableTimeRanges":[
# {"duration":134.97666666666666,"start":0.0}
# ]
# }


result = {
:_position => info['position'].to_i,
:_duration => info['duration'].to_i
}
result.to_json
end

post '/test' do
Expand Down
1 change: 1 addition & 0 deletions public/css/m-player.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 5e7ebb6

Please sign in to comment.