aboutsummaryrefslogtreecommitdiffstats
path: root/view/js/main.js
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2015-11-24 07:23:43 +0100
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2015-11-24 07:23:43 +0100
commit2b2723cb74dd74fc449d76f29edd7797b16c7e84 (patch)
tree23e002e6e22211e3dba7742a4ea50ffc14653f95 /view/js/main.js
parent7338649fa54a109122deecc743079eab6b9c1251 (diff)
parente485ecb3b453a50a1974992b5ccf5122e154a5dc (diff)
downloadvolse-hubzilla-2b2723cb74dd74fc449d76f29edd7797b16c7e84.tar.gz
volse-hubzilla-2b2723cb74dd74fc449d76f29edd7797b16c7e84.tar.bz2
volse-hubzilla-2b2723cb74dd74fc449d76f29edd7797b16c7e84.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'view/js/main.js')
-rw-r--r--view/js/main.js21
1 files changed, 20 insertions, 1 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 8bd4357cc..ca7d50b90 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -247,6 +247,7 @@ var pageHasMoreContent = true;
var updateCountsOnly = false;
var divmore_height = 400;
var last_filestorage_id = null;
+var mediaPlaying = false;
$(function() {
$.ajaxSetup({cache: false});
@@ -359,7 +360,7 @@ function NavUpdate() {
if(liking)
$('.like-rotator').spin(false);
- if(! stopped) {
+ if((! stopped) && (! mediaPlaying)) {
var pingCmd = 'ping' + ((localUser != 0) ? '?f=&uid=' + localUser : '');
$.get(pingCmd,function(data) {
@@ -595,6 +596,24 @@ function updateConvItems(mode,data) {
$('body').css('cursor', 'auto');
}
+ $('video').off('playing');
+ $('video').off('pause');
+ $('audio').off('playing');
+ $('audio').off('pause');
+
+ $('video').on('playing', function() {
+ mediaPlaying = true;
+ });
+ $('video').on('pause', function() {
+ mediaPlaying = false;
+ });
+ $('audio').on('playing', function() {
+ mediaPlaying = true;
+ });
+ $('audio').on('pause', function() {
+ mediaPlaying = false;
+ });
+
/* autocomplete @nicknames */
$(".comment-edit-form textarea").editor_autocomplete(baseurl+"/acl?f=&n=1");