我的Cordova移动应用程序中有一个带有OpenLayers映射的页面。看来OpenLayers捕获了拖动事件,所以当用户触摸地图时,不可能滚动页面(仅当拖动事件在地图外部开始时才起作用)。我在这里找到了几个类似的问题(例如Openlayers unable to vertically scroll page when touch and dragging the map)。所以我的代码现在看起来像这样:
HTML:
# path to ffmpeg
export ffmpeg='/home/user/bin'
# source movies from
export movieSource='/mnt/dev1/radio/Masha'
# tmp dir
export tmpDir='/mnt/dev1/radio/Masha'
# setup positon, color, background, font for the text overlays
# filterComplex, quotes have to be escaped! -> \"
# BITC - Burned In Time Code
export filterComplexTimecode='drawtext=fontfile='/usr/share/fonts/truetype/freefont/FreeSerif.ttf': timecode='10\:00\:00\:00': timecode_rate=24: x=(w-tw)/2: y=h-(1*lh)-3: fontsize=20: fontcolor=white@0.4: box=1: boxcolor=0x00000000@0.4: boxborderw=4'
# Date
export filterComplexDate='drawtext=fontfile='/usr/share/fonts/truetype/freefont/FreeSerif.ttf': text='%{localtime\:%X}': x=(w-tw-3): y=h-(1*lh)-3: fontsize=20: fontcolor=white@0.4: box=1: boxcolor=0x00000000@0.4: boxborderw=4'
# Shotname
export filterComplexShotname='drawtext=fontfile='/usr/share/fonts/truetype/freefont/FreeSerif.ttf': x=0: y=h-(1*lh)+1: fontsize=20: fontcolor=white@0.4: box=1: boxcolor=0x00000000@0.4: boxborderw=4:'
# create a list of all files
find "$movieSource" -name "*.mp4" -type f | sort -R | while read j; do echo "file '$j'" >> $tmpDir/filelist.txt; done
echo filename, durationInSeconds > $tmpDir/fileNameDuration.txt
for file in $movieSource/*.mp4; do
# Reset current duration to 0 (zero) for each loop
export curDuration=0
# get the filename without file extenion
export fileName=${file##*/}
# get the duration of a single clip
# and write it to a tmp textfile
$ffmpeg/ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$file" > $tmpDir/fileTempDuration.txt
# read the textfile again into a variable
read -p < $tmpDir/fileTempDuration.txt last curDuration
# write the filename and the duration to a new list of all files
echo $fileName,$curDuration >> $tmpDir/fileNameDuration.txt ;done
# concate a filter complex string for ffmpeg with all clipnames as textlayer with a inpoint and outpoint
export filterComplexShotnameCombined=
# floating numbers are not supported by batch, so we need to work-around that
source :IntAsFP b=0.000000
for i in $tmpDir/fileNameDuration.txt; do
source :IntAsFP a=$j
source :IntToFP inPoint=$b 6
export c=$(expr a + b)
export b=c
source :IntToFP outPoint=$c 6
# just to check whats going on...
echo name: $i duration: $j inPoint: $inPoint outPoint: $outPoint
export filterComplexShotnameCombined='$filterComplexShotnameCombined, $filterComplexShotname text=$i: enable=between(t\,$inPoint\,$outPoint^^^)';done
JS:
(function () {
if (jQuery && jQuery.fn && jQuery.fn.select2 && jQuery.fn.select2.amd) var e = jQuery.fn.select2.amd;
return e.define("select2/i18n/en", [], function () {
return {
errorLoading: function () {
return "The results could not be loaded."
}, inputTooLong: function (e) {
var t = e.input.length - e.maximum, n = "Please delete " + t + " character";
return t != 1 && (n += "s"), n
}, inputTooShort: function (e) {
var t = e.minimum - e.input.length, n = "Please enter " + t + " or more characters";
return n
}, loadingMore: function () {
return "Loading more results…"
}, maximumSelected: function (e) {
var t = "You can only select " + e.maximum + " item";
return e.maximum != 1 && (t += "s"), t
}, noResults: function () {
return "No results found"
}, searching: function () {
return "Searching…"
}, removeAllItems: function () {
return "Remove all items"
}
}
}), {define: e.define, require: e.require}})();
不幸的是,无法使用此代码滚动页面事件。