@breakside/jskit 2026.2.2 → 2026.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Frameworks/DOM.jsframework/Info.json +2 -2
- package/Frameworks/DOM.jsframework/io.breakside.JSKit.DOM-bundle.js +2 -2
- package/Frameworks/FontKit.jsframework/Info.json +2 -2
- package/Frameworks/FontKit.jsframework/io.breakside.JSKit.FontKit-bundle.js +2 -2
- package/Frameworks/Foundation.jsframework/Info.json +2 -2
- package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
- package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
- package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
- package/Info.json +2 -2
- package/Node/io.breakside.jskit-bundle.js +2 -2
- package/Root/Frameworks/APIKit/Info.yaml +1 -1
- package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/AuthKit/Info.yaml +1 -1
- package/Root/Frameworks/CSSOM/Info.yaml +1 -1
- package/Root/Frameworks/ChartKit/Info.yaml +1 -1
- package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
- package/Root/Frameworks/DBKit/Info.yaml +1 -1
- package/Root/Frameworks/DOM/Info.yaml +1 -1
- package/Root/Frameworks/Dispatch/Info.yaml +1 -1
- package/Root/Frameworks/FontKit/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/Info.yaml +1 -1
- package/Root/Frameworks/ImageKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKit/QuickTime/MKQuickTime.js +37 -0
- package/Root/Frameworks/MediaKit/QuickTime/MKQuickTimeMedia.js +79 -4
- package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
- package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
- package/Root/Frameworks/PDFKit/Info.yaml +1 -1
- package/Root/Frameworks/QRKit/Info.yaml +1 -1
- package/Root/Frameworks/SearchKit/Info.yaml +1 -1
- package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/TestKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/UIWindowServer.js +3 -0
- package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.DOM",
|
|
4
|
-
"JSBundleVersion": "2026.
|
|
4
|
+
"JSBundleVersion": "2026.4.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "DOM+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "16922bf35c07196168a6b3ae71c9b96ea53d1c19"
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.DOM",
|
|
6
|
-
"JSBundleVersion": "2026.
|
|
6
|
+
"JSBundleVersion": "2026.4.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
|
|
|
11
11
|
"node": "DOM+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "16922bf35c07196168a6b3ae71c9b96ea53d1c19"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [],
|
|
17
17
|
"ResourceLookup": {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.FontKit",
|
|
4
|
-
"JSBundleVersion": "2026.
|
|
4
|
+
"JSBundleVersion": "2026.4.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
8
8
|
"html": "FontKit+HTML.js"
|
|
9
9
|
},
|
|
10
10
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
11
|
-
"GitRevision": "
|
|
11
|
+
"GitRevision": "16922bf35c07196168a6b3ae71c9b96ea53d1c19"
|
|
12
12
|
}
|
|
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.JSKit.FontKit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.FontKit",
|
|
6
|
-
"JSBundleVersion": "2026.
|
|
6
|
+
"JSBundleVersion": "2026.4.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
10
10
|
"html": "FontKit+HTML.js"
|
|
11
11
|
},
|
|
12
12
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
13
|
-
"GitRevision": "
|
|
13
|
+
"GitRevision": "16922bf35c07196168a6b3ae71c9b96ea53d1c19"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [],
|
|
16
16
|
"ResourceLookup": {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.Foundation",
|
|
4
|
-
"JSBundleVersion": "2026.
|
|
4
|
+
"JSBundleVersion": "2026.4.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "Foundation+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "16922bf35c07196168a6b3ae71c9b96ea53d1c19"
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.Foundation'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.Foundation",
|
|
6
|
-
"JSBundleVersion": "2026.
|
|
6
|
+
"JSBundleVersion": "2026.4.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.Foundation'] = {
|
|
|
11
11
|
"node": "Foundation+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "16922bf35c07196168a6b3ae71c9b96ea53d1c19"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [
|
|
17
17
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
|
|
4
|
-
"JSBundleVersion": "2026.
|
|
4
|
+
"JSBundleVersion": "2026.4.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "SecurityKit+Node.js"
|
|
10
10
|
},
|
|
11
11
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
12
|
-
"GitRevision": "
|
|
12
|
+
"GitRevision": "16922bf35c07196168a6b3ae71c9b96ea53d1c19"
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.SecurityKit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
|
|
6
|
-
"JSBundleVersion": "2026.
|
|
6
|
+
"JSBundleVersion": "2026.4.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.SecurityKit'] = {
|
|
|
11
11
|
"node": "SecurityKit+Node.js"
|
|
12
12
|
},
|
|
13
13
|
"JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
|
|
14
|
-
"GitRevision": "
|
|
14
|
+
"GitRevision": "16922bf35c07196168a6b3ae71c9b96ea53d1c19"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [],
|
|
17
17
|
"ResourceLookup": {
|
package/Info.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "node",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
4
|
-
"JSBundleVersion": "2026.
|
|
4
|
+
"JSBundleVersion": "2026.4.0",
|
|
5
5
|
"JSExecutableName": "jskit",
|
|
6
6
|
"NPMOrganization": "breakside",
|
|
7
7
|
"JSResources": [
|
|
8
8
|
"Tests/HTMLTestRunner.js",
|
|
9
9
|
"Tests/NodeTestRunner.js"
|
|
10
10
|
],
|
|
11
|
-
"GitRevision": "
|
|
11
|
+
"GitRevision": "16922bf35c07196168a6b3ae71c9b96ea53d1c19"
|
|
12
12
|
}
|
|
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.jskit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "node",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
6
|
-
"JSBundleVersion": "2026.
|
|
6
|
+
"JSBundleVersion": "2026.4.0",
|
|
7
7
|
"JSExecutableName": "jskit",
|
|
8
8
|
"NPMOrganization": "breakside",
|
|
9
9
|
"JSResources": [
|
|
10
10
|
"Tests/HTMLTestRunner.js",
|
|
11
11
|
"Tests/NodeTestRunner.js"
|
|
12
12
|
],
|
|
13
|
-
"GitRevision": "
|
|
13
|
+
"GitRevision": "16922bf35c07196168a6b3ae71c9b96ea53d1c19"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [
|
|
16
16
|
{
|
|
@@ -29,9 +29,43 @@ JSClass("MKQuickTime", MKQuickTimeAtom, {
|
|
|
29
29
|
if (header === null){
|
|
30
30
|
return -1;
|
|
31
31
|
}
|
|
32
|
+
if (header.timeScale === 0){
|
|
33
|
+
logger.warn("mvhd timeScale = 0");
|
|
34
|
+
// Seen some videos in the wild with timeScale = 0
|
|
35
|
+
// That messes up our ability to calcualte things using timeScale,
|
|
36
|
+
// but those videos are still playable by QuickTime, so there's
|
|
37
|
+
// gotta be something else we can do. Documentation doesn't really
|
|
38
|
+
// say anything, so we'll look to tracks for an answer.
|
|
39
|
+
return this.durationCalculatedFromTracks;
|
|
40
|
+
}
|
|
32
41
|
return header.duration / header.timeScale;
|
|
33
42
|
},
|
|
34
43
|
|
|
44
|
+
durationCalculatedFromTracks: JSReadOnlyProperty(),
|
|
45
|
+
|
|
46
|
+
getDurationCalculatedFromTracks: function(){
|
|
47
|
+
var movie = this.movie;
|
|
48
|
+
if (movie === null){
|
|
49
|
+
return -1;
|
|
50
|
+
}
|
|
51
|
+
var track;
|
|
52
|
+
var media;
|
|
53
|
+
var i, l;
|
|
54
|
+
var longestTrackDuration = -1;
|
|
55
|
+
var duration;
|
|
56
|
+
for (i = 0, l = movie.tracks.length; i < l; ++i){
|
|
57
|
+
track = movie.tracks[i];
|
|
58
|
+
media = track.media;
|
|
59
|
+
if (media !== null){
|
|
60
|
+
duration = media.duration;
|
|
61
|
+
if (duration > longestTrackDuration){
|
|
62
|
+
longestTrackDuration = duration;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return longestTrackDuration;
|
|
67
|
+
},
|
|
68
|
+
|
|
35
69
|
posterTime: JSReadOnlyProperty(),
|
|
36
70
|
|
|
37
71
|
getPosterTime: function(){
|
|
@@ -43,6 +77,9 @@ JSClass("MKQuickTime", MKQuickTimeAtom, {
|
|
|
43
77
|
if (header === null){
|
|
44
78
|
return 0;
|
|
45
79
|
}
|
|
80
|
+
if (header.timeScale === 0){
|
|
81
|
+
return 0;
|
|
82
|
+
}
|
|
46
83
|
return header.posterTime / header.timeScale;
|
|
47
84
|
},
|
|
48
85
|
|
|
@@ -38,6 +38,53 @@ JSClass("MKQuickTimeMedia", MKQuickTimeAtom, {
|
|
|
38
38
|
return this.atomOfType(MKQuickTimeAtom.Type.hdlr);
|
|
39
39
|
},
|
|
40
40
|
|
|
41
|
+
duration: JSReadOnlyProperty(),
|
|
42
|
+
|
|
43
|
+
getDuration: function(){
|
|
44
|
+
var header = this.mediaHeader;
|
|
45
|
+
if (header === null){
|
|
46
|
+
return -1;
|
|
47
|
+
}
|
|
48
|
+
if (header.timeScale === 0){
|
|
49
|
+
// Seen some videos in the wild with timeScale = 0
|
|
50
|
+
// That messes up our ability to calcualte things using timeScale,
|
|
51
|
+
// but those videos are still playable by QuickTime, so there's
|
|
52
|
+
// gotta be something else we can do. Documentation doesn't really
|
|
53
|
+
// say what to do, so we'll try to use sample counts and a guessed fps.
|
|
54
|
+
return this.durationCalculatedFromSamples;
|
|
55
|
+
}
|
|
56
|
+
return header.duration / header.timeScale;
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
durationCalculatedFromSamples: JSReadOnlyProperty(),
|
|
60
|
+
|
|
61
|
+
getDurationCalculatedFromSamples: function(){
|
|
62
|
+
var handler = this.mediaHandler;
|
|
63
|
+
if (handler === null){
|
|
64
|
+
return -1;
|
|
65
|
+
}
|
|
66
|
+
if (handler.componentSubtype !== MKQuickTimeMediaHandler.ComponentSubtype.vide){
|
|
67
|
+
return -1;
|
|
68
|
+
}
|
|
69
|
+
var info = this.mediaInformation;
|
|
70
|
+
if (info === null){
|
|
71
|
+
return -1;
|
|
72
|
+
}
|
|
73
|
+
var header = this.mediaHeader;
|
|
74
|
+
if (header === null){
|
|
75
|
+
return -1;
|
|
76
|
+
}
|
|
77
|
+
var counts = info.sampleCounts;
|
|
78
|
+
var totalCount = 0;
|
|
79
|
+
var i, l;
|
|
80
|
+
for (i = 0, l = counts.length; i < l; ++i){
|
|
81
|
+
totalCount += counts[i];
|
|
82
|
+
}
|
|
83
|
+
// We're only calling this method when timeScale is 0, in which case
|
|
84
|
+
// `averageVideoFrameRate` will be hard-coded to 30fps
|
|
85
|
+
return totalCount / this.averageVideoFrameRate;
|
|
86
|
+
},
|
|
87
|
+
|
|
41
88
|
videoFrameRates: JSReadOnlyProperty(),
|
|
42
89
|
|
|
43
90
|
getVideoFrameRates: function(){
|
|
@@ -59,8 +106,18 @@ JSClass("MKQuickTimeMedia", MKQuickTimeAtom, {
|
|
|
59
106
|
var rates = [];
|
|
60
107
|
var durations = info.sampleDurations;
|
|
61
108
|
var i, l;
|
|
62
|
-
|
|
63
|
-
|
|
109
|
+
var timeScale = header.timeScale;
|
|
110
|
+
if (timeScale === 0){
|
|
111
|
+
// Seen some videos in the wild with timeScale = 0
|
|
112
|
+
// That messes up our ability to calcualte things using timeScale,
|
|
113
|
+
// but those videos are still playable by QuickTime, so there's
|
|
114
|
+
// gotta be something else we can do. Documentation doesn't really
|
|
115
|
+
// say what to do, so we'll go with a guess: 30fps.
|
|
116
|
+
rates.push(30);
|
|
117
|
+
}else{
|
|
118
|
+
for (i = 0, l = durations.length; i < l; ++i){
|
|
119
|
+
rates.push(timeScale / durations[i]);
|
|
120
|
+
}
|
|
64
121
|
}
|
|
65
122
|
return rates;
|
|
66
123
|
},
|
|
@@ -83,6 +140,15 @@ JSClass("MKQuickTimeMedia", MKQuickTimeAtom, {
|
|
|
83
140
|
if (header === null){
|
|
84
141
|
return null;
|
|
85
142
|
}
|
|
143
|
+
var timeScale = header.timeScale;
|
|
144
|
+
if (timeScale === 0){
|
|
145
|
+
// Seen some videos in the wild with timeScale = 0
|
|
146
|
+
// That messes up our ability to calcualte things using timeScale,
|
|
147
|
+
// but those videos are still playable by QuickTime, so there's
|
|
148
|
+
// gotta be something else we can do. Documentation doesn't really
|
|
149
|
+
// say what to do, so we'll go with a guess: 30fps.
|
|
150
|
+
return 30;
|
|
151
|
+
}
|
|
86
152
|
var counts = info.sampleCounts;
|
|
87
153
|
var durations = info.sampleDurations;
|
|
88
154
|
var totalCount = 0;
|
|
@@ -90,7 +156,7 @@ JSClass("MKQuickTimeMedia", MKQuickTimeAtom, {
|
|
|
90
156
|
var i, l;
|
|
91
157
|
for (i = 0, l = durations.length; i < l; ++i){
|
|
92
158
|
totalCount += counts[i];
|
|
93
|
-
totalSeconds += (durations[i] * counts[i]) /
|
|
159
|
+
totalSeconds += (durations[i] * counts[i]) / timeScale;
|
|
94
160
|
}
|
|
95
161
|
return totalCount / totalSeconds;
|
|
96
162
|
},
|
|
@@ -141,6 +207,15 @@ JSClass("MKQuickTimeMedia", MKQuickTimeAtom, {
|
|
|
141
207
|
if (sizeTable === null){
|
|
142
208
|
return null;
|
|
143
209
|
}
|
|
210
|
+
var timeScale = header.timeScale;
|
|
211
|
+
if (timeScale === 0){
|
|
212
|
+
// Seen some videos in the wild with timeScale = 0
|
|
213
|
+
// That messes up our ability to calcualte things using timeScale,
|
|
214
|
+
// but those videos are still playable by QuickTime, so there's
|
|
215
|
+
// gotta be something else we can do. Documentation doesn't really
|
|
216
|
+
// say what to do, so we'll just bail and say 0.
|
|
217
|
+
return 0;
|
|
218
|
+
}
|
|
144
219
|
var counts = info.sampleCounts;
|
|
145
220
|
var durations = info.sampleDurations;
|
|
146
221
|
var totalSeconds = 0;
|
|
@@ -152,7 +227,7 @@ JSClass("MKQuickTimeMedia", MKQuickTimeAtom, {
|
|
|
152
227
|
for (j = 0; j < counts[i]; ++j, ++s){
|
|
153
228
|
totalBytes += sizeTable.sizeAtIndex(s);
|
|
154
229
|
}
|
|
155
|
-
totalSeconds += (durations[i] * counts[i]) /
|
|
230
|
+
totalSeconds += (durations[i] * counts[i]) / timeScale;
|
|
156
231
|
}
|
|
157
232
|
return (totalBytes * 8) / totalSeconds;
|
|
158
233
|
}
|
|
@@ -871,6 +871,9 @@ JSClass("UIWindowServer", JSObject, {
|
|
|
871
871
|
resizeView = window._resizeView;
|
|
872
872
|
location = window.convertPointToView(location, resizeView);
|
|
873
873
|
}
|
|
874
|
+
if (location === null){
|
|
875
|
+
return UIWindowServer.ResizeOperation.none;
|
|
876
|
+
}
|
|
874
877
|
var resizeFrame = resizeView.bounds;
|
|
875
878
|
var cornerSize = Math.max(resizeView.cornerRadius, this._windowResizeWidthInside);
|
|
876
879
|
if (location.y < resizeFrame.origin.y - this._windowResizeWidthOutside){
|