@breakside/jskit 2023.35.0 → 2023.44.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.
Files changed (66) hide show
  1. package/Frameworks/DOM.jsframework/Info.json +2 -2
  2. package/Frameworks/DOM.jsframework/io.breakside.JSKit.DOM-bundle.js +2 -2
  3. package/Frameworks/FontKit.jsframework/Info.json +2 -2
  4. package/Frameworks/FontKit.jsframework/io.breakside.JSKit.FontKit-bundle.js +2 -2
  5. package/Frameworks/Foundation.jsframework/Info.json +2 -2
  6. package/Frameworks/Foundation.jsframework/JS/JSHTMLHTTPClient.js +1 -1
  7. package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
  8. package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
  9. package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
  10. package/Info.json +2 -2
  11. package/Node/io.breakside.jskit-bundle.js +2 -2
  12. package/Root/Frameworks/APIKit/Info.yaml +1 -1
  13. package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
  14. package/Root/Frameworks/AuthKit/Info.yaml +1 -1
  15. package/Root/Frameworks/CSSOM/Info.yaml +1 -1
  16. package/Root/Frameworks/ChartKit/Info.yaml +1 -1
  17. package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
  18. package/Root/Frameworks/DBKit/Info.yaml +1 -1
  19. package/Root/Frameworks/DOM/Info.yaml +1 -1
  20. package/Root/Frameworks/Dispatch/Info.yaml +1 -1
  21. package/Root/Frameworks/FontKit/Info.yaml +1 -1
  22. package/Root/Frameworks/Foundation/Info.yaml +1 -1
  23. package/Root/Frameworks/Foundation/JSHTMLHTTPClient.js +1 -1
  24. package/Root/Frameworks/ImageKit/Info.yaml +1 -1
  25. package/Root/Frameworks/MediaKit/Info.yaml +1 -1
  26. package/Root/Frameworks/MediaKit/MKAsset+HTML.js +80 -0
  27. package/Root/Frameworks/MediaKit/MKAsset.js +12 -0
  28. package/Root/Frameworks/MediaKit/MKRemoteAsset.js +39 -0
  29. package/Root/Frameworks/MediaKit/MediaKit+HTML.js +2 -1
  30. package/Root/Frameworks/MediaKit/MediaKit.js +17 -1
  31. package/Root/Frameworks/MediaKit/QuickTime/MKQuickTime.js +216 -0
  32. package/Root/Frameworks/MediaKit/QuickTime/MKQuickTimeAtom.js +157 -0
  33. package/Root/Frameworks/MediaKit/QuickTime/MKQuickTimeFileType.js +45 -0
  34. package/Root/Frameworks/MediaKit/QuickTime/MKQuickTimeMedia.js +127 -0
  35. package/Root/Frameworks/MediaKit/QuickTime/MKQuickTimeMediaHandler.js +68 -0
  36. package/Root/Frameworks/MediaKit/QuickTime/MKQuickTimeMediaHeader.js +50 -0
  37. package/Root/Frameworks/MediaKit/QuickTime/MKQuickTimeMediaInformation.js +67 -0
  38. package/Root/Frameworks/MediaKit/QuickTime/MKQuickTimeMeta.js +19 -0
  39. package/Root/Frameworks/MediaKit/QuickTime/MKQuickTimeMovie.js +78 -0
  40. package/Root/Frameworks/MediaKit/QuickTime/MKQuickTimeMovieHeader.js +62 -0
  41. package/Root/Frameworks/MediaKit/QuickTime/MKQuickTimeSampleDescription.js +72 -0
  42. package/Root/Frameworks/MediaKit/QuickTime/MKQuickTimeSampleTable.js +84 -0
  43. package/Root/Frameworks/MediaKit/QuickTime/MKQuickTimeTimeToSample.js +57 -0
  44. package/Root/Frameworks/MediaKit/QuickTime/MKQuickTimeTrack.js +133 -0
  45. package/Root/Frameworks/MediaKit/QuickTime/MKQuickTimeTrackHeader.js +82 -0
  46. package/Root/Frameworks/MediaKit/QuickTime/MKQuickTimeUserData.js +19 -0
  47. package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
  48. package/Root/Frameworks/MediaKitUI/MKVideoView+HTML.js +77 -0
  49. package/Root/Frameworks/MediaKitUI/MKVideoView.js +19 -1
  50. package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
  51. package/Root/Frameworks/PDFKit/Info.yaml +1 -1
  52. package/Root/Frameworks/QRKit/Info.yaml +1 -1
  53. package/Root/Frameworks/SearchKit/Info.yaml +1 -1
  54. package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
  55. package/Root/Frameworks/ServerKit/Info.yaml +1 -1
  56. package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
  57. package/Root/Frameworks/TestKit/Info.yaml +1 -1
  58. package/Root/Frameworks/UIKit/Info.yaml +1 -1
  59. package/Root/Frameworks/UIKit/UIButton.js +29 -10
  60. package/Root/Frameworks/UIKit/UIListView.js +3 -3
  61. package/Root/Frameworks/UIKit/UIMenuView.js +6 -0
  62. package/Root/Frameworks/UIKit/UIPopupButton.js +22 -3
  63. package/Root/Frameworks/UIKit/UISlider.js +4 -2
  64. package/Root/Frameworks/UIKit/UIStackView.js +43 -0
  65. package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
  66. package/package.json +1 -1
@@ -0,0 +1,67 @@
1
+ // #import "MKQuickTimeAtom.js"
2
+ // #import "MKQuickTimeSampleTable.js"
3
+ "use strict";
4
+
5
+ (function(){
6
+
7
+ var logger = JSLog("medikit", "quicktime");
8
+
9
+ JSClass("MKQuickTimeMediaInformation", MKQuickTimeAtom, {
10
+
11
+ type: MKQuickTimeAtom.Type.minf,
12
+
13
+ initWithData: function(data){
14
+ MKQuickTimeMediaInformation.$super.initWithData.call(this, data);
15
+ this.registerAtomClass(MKQuickTimeSampleTable);
16
+ this.readAtoms(8);
17
+ },
18
+
19
+ sampleTable: JSReadOnlyProperty(),
20
+
21
+ getSampleTable: function(){
22
+ return this.atomOfType(MKQuickTimeAtom.Type.stbl);
23
+ },
24
+
25
+ sampleDurations: JSReadOnlyProperty(),
26
+
27
+ getSampleDurations: function(){
28
+ var sampleTable = this.sampleTable;
29
+ if (sampleTable === null){
30
+ return [];
31
+ }
32
+ return sampleTable.sampleDurations;
33
+ },
34
+
35
+ sampleCounts: JSReadOnlyProperty(),
36
+
37
+ getSampleCounts: function(){
38
+ var sampleTable = this.sampleTable;
39
+ if (sampleTable === null){
40
+ return [];
41
+ }
42
+ return sampleTable.sampleCounts;
43
+ },
44
+
45
+ audioSampleRates: JSReadOnlyProperty(),
46
+
47
+ getAudioSampleRates: function(){
48
+ var sampleTable = this.sampleTable;
49
+ if (sampleTable === null){
50
+ return [];
51
+ }
52
+ return sampleTable.audioSampleRates;
53
+ },
54
+
55
+ sampleFormats: JSReadOnlyProperty(),
56
+
57
+ getSampleFormats: function(){
58
+ var sampleTable = this.sampleTable;
59
+ if (sampleTable === null){
60
+ return [];
61
+ }
62
+ return sampleTable.sampleFormats;
63
+ }
64
+
65
+ });
66
+
67
+ })();
@@ -0,0 +1,19 @@
1
+ // #import "MKQuickTimeAtom.js"
2
+ "use strict";
3
+
4
+ (function(){
5
+
6
+ var logger = JSLog("medikit", "quicktime");
7
+
8
+ JSClass("MKQuickTimeMeta", MKQuickTimeAtom, {
9
+
10
+ type: MKQuickTimeAtom.Type.meta,
11
+
12
+ initWithData: function(data){
13
+ MKQuickTimeMeta.$super.initWithData.call(this, data);
14
+ this.readAtoms(8);
15
+ },
16
+
17
+ });
18
+
19
+ })();
@@ -0,0 +1,78 @@
1
+ // #import "MKQuickTimeAtom.js"
2
+ // #import "MKQuickTimeMovieHeader.js"
3
+ // #import "MKQuickTimeTrack.js"
4
+ // #import "MKQuickTimeUserData.js"
5
+ // #import "MKQuickTimeMeta.js"
6
+ "use strict";
7
+
8
+ (function(){
9
+
10
+ var logger = JSLog("medikit", "quicktime");
11
+
12
+ JSClass("MKQuickTimeMovie", MKQuickTimeAtom, {
13
+
14
+ type: MKQuickTimeAtom.Type.moov,
15
+
16
+ initWithData: function(data){
17
+ MKQuickTimeMovie.$super.initWithData.call(this, data);
18
+ this.registerAtomClass(MKQuickTimeMovieHeader);
19
+ this.registerAtomClass(MKQuickTimeTrack);
20
+ this.registerAtomClass(MKQuickTimeUserData);
21
+ this.registerAtomClass(MKQuickTimeMeta);
22
+ this.readAtoms(8);
23
+ },
24
+
25
+ movieHeader: JSReadOnlyProperty(),
26
+
27
+ getMovieHeader: function(){
28
+ return this.atomOfType(MKQuickTimeAtom.Type.mvhd);
29
+ },
30
+
31
+ tracks: JSReadOnlyProperty(),
32
+
33
+ getTracks: function(){
34
+ return this.atomsOfType(MKQuickTimeAtom.Type.trak);
35
+ },
36
+
37
+ trackForID: function(trackID){
38
+ var i, l;
39
+ var tracks = this.tracks;
40
+ for (i = 0, l = tracks.length; i < l; ++i){
41
+ if (tracks[i].trackID === trackID){
42
+ return tracks[i];
43
+ }
44
+ }
45
+ return null;
46
+ },
47
+
48
+ videoTracks: JSReadOnlyProperty(),
49
+
50
+ getVideoTracks: function(){
51
+ var i, l;
52
+ var tracks = this.tracks;
53
+ var videoTracks = [];
54
+ for (i = 0, l = tracks.length; i < l; ++i){
55
+ if (tracks[i].enabled && tracks[i].inMovie && tracks[i].isVideo){
56
+ videoTracks.push(tracks[i]);
57
+ }
58
+ }
59
+ return videoTracks;
60
+ },
61
+
62
+ audioTracks: JSReadOnlyProperty(),
63
+
64
+ getAudioTracks: function(){
65
+ var i, l;
66
+ var tracks = this.tracks;
67
+ var videoTracks = [];
68
+ for (i = 0, l = tracks.length; i < l; ++i){
69
+ if (tracks[i].enabled && tracks[i].inMovie && tracks[i].isAudio){
70
+ videoTracks.push(tracks[i]);
71
+ }
72
+ }
73
+ return videoTracks;
74
+ },
75
+
76
+ });
77
+
78
+ })();
@@ -0,0 +1,62 @@
1
+ // #import "MKQuickTimeAtom.js"
2
+ "use strict";
3
+
4
+ (function(){
5
+
6
+ var logger = JSLog("medikit", "quicktime");
7
+
8
+ JSClass("MKQuickTimeMovieHeader", MKQuickTimeAtom, {
9
+
10
+ type: MKQuickTimeAtom.Type.mvhd,
11
+ version: JSReadOnlyProperty(),
12
+ flags: JSReadOnlyProperty(),
13
+ timeScale: JSReadOnlyProperty(),
14
+ duration: JSReadOnlyProperty(),
15
+ preferredRate: JSReadOnlyProperty(),
16
+ posterTime: JSReadOnlyProperty(),
17
+
18
+ getVersion: function(){
19
+ return this.data[8];
20
+ },
21
+
22
+ getFlags: function(){
23
+ return this.dataView.getUint32(8) & 0x00FFFFFF;
24
+ },
25
+
26
+ getTimeScale: function(){
27
+ return this.dataView.getUint32(20);
28
+ },
29
+
30
+ getDuration: function(){
31
+ return this.dataView.getUint32(24);
32
+ },
33
+
34
+ getPreferredRate: function(){
35
+ return this.dataView.getUint16(28) + this.dataView.getUint16(30) / 0xFFFF;
36
+ },
37
+
38
+ getPosterTime: function(){
39
+ return this.dataView.getUint32(78);
40
+ },
41
+
42
+ initWithData: function(data){
43
+ if (data.length < 98){
44
+ throw new Error("expecting at least 98 bytes for mvhd atom");
45
+ }
46
+ MKQuickTimeMovieHeader.$super.initWithData.call(this, data);
47
+ },
48
+
49
+ dictionaryRepresentation: function(){
50
+ return {
51
+ type: MKQuickTimeAtom.stringForType(this.type),
52
+ version: this.version,
53
+ timeScale: this.timeScale,
54
+ duration: this.duration,
55
+ preferredRate: this.preferredRate,
56
+ posterTime: this.posterTime
57
+ };
58
+ },
59
+
60
+ });
61
+
62
+ })();
@@ -0,0 +1,72 @@
1
+ // #import "MKQuickTimeAtom.js"
2
+ "use strict";
3
+
4
+ (function(){
5
+
6
+ var logger = JSLog("medikit", "quicktime");
7
+
8
+ JSClass("MKQuickTimeSampleDescription", MKQuickTimeAtom, {
9
+
10
+ type: MKQuickTimeAtom.Type.stsd,
11
+ version: JSReadOnlyProperty(),
12
+ flags: JSReadOnlyProperty(),
13
+ numberOfEntries: JSReadOnlyProperty(),
14
+
15
+ getVersion: function(){
16
+ return this.data[8];
17
+ },
18
+
19
+ getFlags: function(){
20
+ return this.dataView.getUint32(8) & 0x00FFFFFF;
21
+ },
22
+
23
+ initWithData: function(data){
24
+ MKQuickTimeSampleDescription.$super.initWithData.call(this, data);
25
+ if (data.length < 16){
26
+ throw new Error("expecting at least 16 bytes for stts atom");
27
+ }
28
+ },
29
+
30
+ getNumberOfEntries: function(){
31
+ return this.dataView.getUint32(12);
32
+ },
33
+
34
+ formats: JSReadOnlyProperty(),
35
+
36
+ getFormats: function(){
37
+ var formats = [];
38
+ var i = 16;
39
+ var l = this.data.length;
40
+ var n = this.numberOfEntries;
41
+ var index = 0;
42
+ var size;
43
+ while (index < n && i < l - 16){
44
+ size = this.dataView.getUint32(i);
45
+ formats.push(this.dataView.getUint32(i + 4));
46
+ i += size;
47
+ }
48
+ return formats;
49
+ },
50
+
51
+ audioSampleRates: JSReadOnlyProperty(),
52
+
53
+ getAudioSampleRates: function(){
54
+ var rates = [];
55
+ var i = 16;
56
+ var l = this.data.length;
57
+ var n = this.numberOfEntries;
58
+ var index = 0;
59
+ var size;
60
+ while (index < n && i < l - 16){
61
+ size = this.dataView.getUint32(i);
62
+ if (size >= 36){
63
+ rates.push(this.dataView.getUint16(i + 32) + this.dataView.getUint16(i + 34) / 0xFFFF);
64
+ }
65
+ i += size;
66
+ }
67
+ return rates;
68
+ }
69
+
70
+ });
71
+
72
+ })();
@@ -0,0 +1,84 @@
1
+ // #import "MKQuickTimeAtom.js"
2
+ // #import "MKQuickTimeTimeToSample.js"
3
+ // #import "MKQuickTimeSampleDescription.js"
4
+ "use strict";
5
+
6
+ (function(){
7
+
8
+ var logger = JSLog("medikit", "quicktime");
9
+
10
+
11
+ JSClass("MKQuickTimeSampleTable", MKQuickTimeAtom, {
12
+
13
+ type: MKQuickTimeAtom.Type.stbl,
14
+
15
+ initWithData: function(data){
16
+ MKQuickTimeSampleTable.$super.initWithData.call(this, data);
17
+ this.registerAtomClass(MKQuickTimeTimeToSample);
18
+ this.registerAtomClass(MKQuickTimeSampleDescription);
19
+ this.readAtoms(8);
20
+ },
21
+
22
+ timeToSample: JSReadOnlyProperty(),
23
+
24
+ getTimeToSample: function(){
25
+ return this.atomOfType(MKQuickTimeAtom.Type.stts);
26
+ },
27
+
28
+ sampleDescription: JSReadOnlyProperty(),
29
+
30
+ getSampleDescription: function(){
31
+ return this.atomOfType(MKQuickTimeAtom.Type.stsd);
32
+ },
33
+
34
+ sampleDurations: JSReadOnlyProperty(),
35
+
36
+ getSampleDurations: function(){
37
+ var timeToSample = this.timeToSample;
38
+ var durations = [];
39
+ if (timeToSample !== null){
40
+ var i, l;
41
+ for (i = 0, l = timeToSample.numberOfEntries; i < l; ++i){
42
+ durations.push(timeToSample.durationAtIndex(i));
43
+ }
44
+ }
45
+ return durations;
46
+ },
47
+
48
+ sampleCounts: JSReadOnlyProperty(),
49
+
50
+ getSampleCounts: function(){
51
+ var timeToSample = this.timeToSample;
52
+ var counts = [];
53
+ if (timeToSample !== null){
54
+ var i, l;
55
+ for (i = 0, l = timeToSample.numberOfEntries; i < l; ++i){
56
+ counts.push(timeToSample.countAtIndex(i));
57
+ }
58
+ }
59
+ return counts;
60
+ },
61
+
62
+ audioSampleRates: JSReadOnlyProperty(),
63
+
64
+ getAudioSampleRates: function(){
65
+ var description = this.sampleDescription;
66
+ if (description === null){
67
+ return [];
68
+ }
69
+ return description.audioSampleRates;
70
+ },
71
+
72
+ sampleFormats: JSReadOnlyProperty(),
73
+
74
+ getSampleFormats: function(){
75
+ var description = this.sampleDescription;
76
+ if (description === null){
77
+ return [];
78
+ }
79
+ return description.formats;
80
+ }
81
+
82
+ });
83
+
84
+ })();
@@ -0,0 +1,57 @@
1
+ // #import "MKQuickTimeAtom.js"
2
+ "use strict";
3
+
4
+ (function(){
5
+
6
+ var logger = JSLog("medikit", "quicktime");
7
+
8
+ JSClass("MKQuickTimeTimeToSample", MKQuickTimeAtom, {
9
+
10
+ type: MKQuickTimeAtom.Type.stts,
11
+ version: JSReadOnlyProperty(),
12
+ flags: JSReadOnlyProperty(),
13
+ numberOfEntries: JSReadOnlyProperty(),
14
+
15
+ getVersion: function(){
16
+ return this.data[8];
17
+ },
18
+
19
+ getFlags: function(){
20
+ return this.dataView.getUint32(8) & 0x00FFFFFF;
21
+ },
22
+
23
+ initWithData: function(data){
24
+ MKQuickTimeTimeToSample.$super.initWithData.call(this, data);
25
+ if (data.length < 16){
26
+ throw new Error("expecting at least 16 bytes for stts atom");
27
+ }
28
+ var n = this.numberOfEntries;
29
+ var l = 16 + 8 * n;
30
+ if (data.length < l){
31
+ throw new Error("expecting at least %d bytes for stts atom with %d entries".sprintf(l, n));
32
+ }
33
+ },
34
+
35
+ getNumberOfEntries: function(){
36
+ return this.dataView.getUint32(12);
37
+ },
38
+
39
+ countAtIndex: function(index){
40
+ var i = 16 + index * 8;
41
+ if (i >= 16 && i < this.data.length){
42
+ return this.dataView.getUint32(i);
43
+ }
44
+ return null;
45
+ },
46
+
47
+ durationAtIndex: function(index){
48
+ var i = 16 + index * 8;
49
+ if (i >= 16 && i < this.data.length){
50
+ return this.dataView.getUint32(i + 4);
51
+ }
52
+ return null;
53
+ }
54
+
55
+ });
56
+
57
+ })();
@@ -0,0 +1,133 @@
1
+ // #import "MKQuickTimeAtom.js"
2
+ // #import "MKQuickTimeTrackHeader.js"
3
+ // #import "MKQuickTimeMedia.js"
4
+ "use strict";
5
+
6
+ (function(){
7
+
8
+ var logger = JSLog("medikit", "quicktime");
9
+
10
+ JSClass("MKQuickTimeTrack", MKQuickTimeAtom, {
11
+
12
+ type: MKQuickTimeAtom.Type.trak,
13
+
14
+ initWithData: function(data){
15
+ MKQuickTimeTrack.$super.initWithData.call(this, data);
16
+ this.registerAtomClass(MKQuickTimeTrackHeader);
17
+ this.registerAtomClass(MKQuickTimeMedia);
18
+ this.readAtoms(8);
19
+ },
20
+
21
+ trackHeader: JSReadOnlyProperty(),
22
+
23
+ getTrackHeader: function(){
24
+ return this.atomOfType(MKQuickTimeAtom.Type.tkhd);
25
+ },
26
+
27
+ media: JSReadOnlyProperty(),
28
+
29
+ getMedia: function(){
30
+ return this.atomOfType(MKQuickTimeAtom.Type.mdia);
31
+ },
32
+
33
+ isVideo: JSReadOnlyProperty(),
34
+
35
+ getIsVideo: function(){
36
+ var media = this.media;
37
+ if (media === null){
38
+ return false;
39
+ }
40
+ var handler = media.mediaHandler;
41
+ if (handler === null){
42
+ return false;
43
+ }
44
+ return (handler.componentType === MKQuickTimeMediaHandler.ComponentType.unspecified || handler.componentType === MKQuickTimeMediaHandler.ComponentType.mhlr) && handler.componentSubtype === MKQuickTimeMediaHandler.ComponentSubtype.vide;
45
+ },
46
+
47
+ isAudio: JSReadOnlyProperty(),
48
+
49
+ getIsAudio: function(){
50
+ var media = this.media;
51
+ if (media === null){
52
+ return false;
53
+ }
54
+ var handler = media.mediaHandler;
55
+ if (handler === null){
56
+ return false;
57
+ }
58
+ return (handler.componentType === MKQuickTimeMediaHandler.ComponentType.unspecified || handler.componentType === MKQuickTimeMediaHandler.ComponentType.mhlr) && handler.componentSubtype === MKQuickTimeMediaHandler.ComponentSubtype.soun;
59
+ },
60
+
61
+ inMovie: JSReadOnlyProperty(),
62
+
63
+ getInMovie: function(){
64
+ var header = this.trackHeader;
65
+ if (header === null){
66
+ return false;
67
+ }
68
+ return header.inMovie;
69
+ },
70
+
71
+ enabled: JSReadOnlyProperty(),
72
+
73
+ getEnabled: function(){
74
+ var header = this.trackHeader;
75
+ if (header === null){
76
+ return false;
77
+ }
78
+ return header.enabled;
79
+ },
80
+
81
+ videoResolution: JSReadOnlyProperty(),
82
+
83
+ getVideoResolution: function(){
84
+ var header = this.trackHeader;
85
+ if (header === null){
86
+ return null;
87
+ }
88
+ return header.videoResolution;
89
+ },
90
+
91
+ videoFrameRates: JSReadOnlyProperty(),
92
+
93
+ getVideoFrameRates: function(){
94
+ var media = this.media;
95
+ if (media === null){
96
+ return [];
97
+ }
98
+ return media.videoFrameRates;
99
+ },
100
+
101
+ averageVideoFrameRate: JSReadOnlyProperty(),
102
+
103
+ getAverageVideoFrameRate: function(){
104
+ var media = this.media;
105
+ if (media === null){
106
+ return [];
107
+ }
108
+ return media.averageVideoFrameRate;
109
+ },
110
+
111
+ audioSampleRates: JSReadOnlyProperty(),
112
+
113
+ getAudioSampleRates: function(){
114
+ var media = this.media;
115
+ if (media === null){
116
+ return [];
117
+ }
118
+ return media.audioSampleRates;
119
+ },
120
+
121
+ sampleFormats: JSReadOnlyProperty(),
122
+
123
+ getSampleFormats: function(){
124
+ var media = this.media;
125
+ if (media === null){
126
+ return [];
127
+ }
128
+ return media.sampleFormats;
129
+ }
130
+
131
+ });
132
+
133
+ })();
@@ -0,0 +1,82 @@
1
+ // #import "MKQuickTimeAtom.js"
2
+ "use strict";
3
+
4
+ (function(){
5
+
6
+ var logger = JSLog("medikit", "quicktime");
7
+
8
+ JSClass("MKQuickTimeTrackHeader", MKQuickTimeAtom, {
9
+
10
+ type: MKQuickTimeAtom.Type.tkhd,
11
+ version: JSReadOnlyProperty(),
12
+ flags: JSReadOnlyProperty(),
13
+ trackID: JSReadOnlyProperty(),
14
+ duration: JSReadOnlyProperty(),
15
+ width: JSReadOnlyProperty(),
16
+ height: JSReadOnlyProperty(),
17
+
18
+ getVersion: function(){
19
+ return this.data[8];
20
+ },
21
+
22
+ getFlags: function(){
23
+ return this.dataView.getUint32(8) & 0x00FFFFFF;
24
+ },
25
+
26
+ enabled: JSReadOnlyProperty(),
27
+
28
+ getEnabled: function(){
29
+ return (this.flags & 0x0001) === 0x0001;
30
+ },
31
+
32
+ inMovie: JSReadOnlyProperty(),
33
+
34
+ getInMovie: function(){
35
+ return (this.flags & 0x0001) === 0x0001;
36
+ },
37
+
38
+ getTrackID: function(){
39
+ return this.dataView.getUint32(20);
40
+ },
41
+
42
+ getDuration: function(){
43
+ return this.dataView.getUint32(28);
44
+ },
45
+
46
+ getWidth: function(){
47
+ return this.dataView.getUint16(84) + this.dataView.getUint16(86) / 0xFFFF;
48
+ },
49
+
50
+ getHeight: function(){
51
+ return this.dataView.getUint16(88) + this.dataView.getUint16(90) / 0xFFFF;
52
+ },
53
+
54
+ videoResolution: JSReadOnlyProperty(),
55
+
56
+ getVideoResolution: function(){
57
+ return JSSize(this.width, this.height);
58
+ },
59
+
60
+ initWithData: function(data){
61
+ if (data.length < 92){
62
+ throw new Error("expecting at least 92 bytes for tkhd atom");
63
+ }
64
+ MKQuickTimeTrackHeader.$super.initWithData.call(this, data);
65
+ },
66
+
67
+ dictionaryRepresentation: function(){
68
+ return {
69
+ type: MKQuickTimeAtom.stringForType(this.type),
70
+ version: this.version,
71
+ enabled: this.enabled,
72
+ inMovie: this.inMovie,
73
+ trackID: this.trackID,
74
+ duration: this.duration,
75
+ width: this.width,
76
+ height: this.height
77
+ };
78
+ },
79
+
80
+ });
81
+
82
+ })();
@@ -0,0 +1,19 @@
1
+ // #import "MKQuickTimeAtom.js"
2
+ "use strict";
3
+
4
+ (function(){
5
+
6
+ var logger = JSLog("medikit", "quicktime");
7
+
8
+ JSClass("MKQuickTimeUserData", MKQuickTimeAtom, {
9
+
10
+ type: MKQuickTimeAtom.Type.udta,
11
+
12
+ initWithData: function(data){
13
+ MKQuickTimeUserData.$super.initWithData.call(this, data);
14
+ this.readAtoms(8);
15
+ },
16
+
17
+ });
18
+
19
+ })();
@@ -1,6 +1,6 @@
1
1
  JSBundleType: framework
2
2
  JSBundleIdentifier: io.breakside.JSKit.MediaKitUI
3
- JSBundleVersion: 2023.35.0
3
+ JSBundleVersion: 2023.44.0
4
4
  JSDevelopmentLanguage: en
5
5
  JSCopyright: Copyright © 2020 Breakside Inc.
6
6
  JSBundleEnvironments: