unified-video-framework 1.4.399 → 1.4.401
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/package.json +1 -1
- package/packages/web/dist/ads/GoogleAdsManager.d.ts +3 -3
- package/packages/web/dist/ads/GoogleAdsManager.d.ts.map +1 -1
- package/packages/web/dist/ads/LiveStreamAdsManager.d.ts +50 -0
- package/packages/web/dist/ads/LiveStreamAdsManager.d.ts.map +1 -0
- package/packages/web/dist/ads/LiveStreamAdsManager.js +359 -0
- package/packages/web/dist/ads/LiveStreamAdsManager.js.map +1 -0
- package/packages/web/dist/react/WebPlayerView.d.ts +12 -0
- package/packages/web/dist/react/WebPlayerView.d.ts.map +1 -1
- package/packages/web/dist/react/WebPlayerView.js +156 -61
- package/packages/web/dist/react/WebPlayerView.js.map +1 -1
- package/packages/web/dist/react/examples/live-stream-ads-example.d.ts +8 -0
- package/packages/web/dist/react/examples/live-stream-ads-example.d.ts.map +1 -0
- package/packages/web/dist/react/examples/live-stream-ads-example.js +177 -0
- package/packages/web/dist/react/examples/live-stream-ads-example.js.map +1 -0
- package/packages/web/src/ads/GoogleAdsManager.ts +3 -3
- package/packages/web/src/ads/LiveStreamAdsManager.ts +625 -0
- package/packages/web/src/react/WebPlayerView.tsx +166 -14
- package/packages/web/src/react/examples/live-stream-ads-example.tsx +362 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { WebPlayerView } from "../WebPlayerView.js";
|
|
3
|
+
export const LiveStreamAdsExample = () => {
|
|
4
|
+
const [adEvents, setAdEvents] = useState([]);
|
|
5
|
+
const [mode, setMode] = useState('periodic');
|
|
6
|
+
const logAdEvent = (event) => {
|
|
7
|
+
console.log(`[Ad Event] ${event}`);
|
|
8
|
+
setAdEvents(prev => [...prev, `${new Date().toLocaleTimeString()}: ${event}`].slice(-10));
|
|
9
|
+
};
|
|
10
|
+
return (React.createElement("div", { style: { height: '100vh', display: 'flex', flexDirection: 'column' } },
|
|
11
|
+
React.createElement("div", { style: { padding: '20px', backgroundColor: '#f5f5f5', borderBottom: '1px solid #ddd' } },
|
|
12
|
+
React.createElement("h2", { style: { margin: '0 0 15px 0' } }, "Live Stream Ads - Example"),
|
|
13
|
+
React.createElement("div", { style: { display: 'flex', gap: '10px', marginBottom: '10px' } },
|
|
14
|
+
React.createElement("button", { onClick: () => setMode('metadata'), style: {
|
|
15
|
+
padding: '10px 20px',
|
|
16
|
+
backgroundColor: mode === 'metadata' ? '#007bff' : '#6c757d',
|
|
17
|
+
color: 'white',
|
|
18
|
+
border: 'none',
|
|
19
|
+
borderRadius: '4px',
|
|
20
|
+
cursor: 'pointer'
|
|
21
|
+
} }, "Metadata Mode"),
|
|
22
|
+
React.createElement("button", { onClick: () => setMode('periodic'), style: {
|
|
23
|
+
padding: '10px 20px',
|
|
24
|
+
backgroundColor: mode === 'periodic' ? '#007bff' : '#6c757d',
|
|
25
|
+
color: 'white',
|
|
26
|
+
border: 'none',
|
|
27
|
+
borderRadius: '4px',
|
|
28
|
+
cursor: 'pointer'
|
|
29
|
+
} }, "Periodic Mode (Every 2 min)"),
|
|
30
|
+
React.createElement("button", { onClick: () => setMode('hybrid'), style: {
|
|
31
|
+
padding: '10px 20px',
|
|
32
|
+
backgroundColor: mode === 'hybrid' ? '#007bff' : '#6c757d',
|
|
33
|
+
color: 'white',
|
|
34
|
+
border: 'none',
|
|
35
|
+
borderRadius: '4px',
|
|
36
|
+
cursor: 'pointer'
|
|
37
|
+
} }, "Hybrid Mode")),
|
|
38
|
+
React.createElement("div", { style: { fontSize: '14px', color: '#666' } },
|
|
39
|
+
React.createElement("strong", null, "Current Mode:"),
|
|
40
|
+
" ",
|
|
41
|
+
mode,
|
|
42
|
+
mode === 'metadata' && ' - Detects #EXT-X-DATERANGE tags in HLS stream',
|
|
43
|
+
mode === 'periodic' && ' - Shows ads every 2 minutes of playback',
|
|
44
|
+
mode === 'hybrid' && ' - Uses both metadata detection AND periodic fallback')),
|
|
45
|
+
React.createElement("div", { style: { flex: 1, position: 'relative', backgroundColor: '#000' } },
|
|
46
|
+
React.createElement(WebPlayerView, { url: "https://stream.example.com/live.m3u8", type: "hls", autoPlay: false, controls: true, muted: true, googleAds: {
|
|
47
|
+
adTagUrl: 'https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinear&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=',
|
|
48
|
+
liveAdBreakMode: mode,
|
|
49
|
+
periodicAdInterval: 120,
|
|
50
|
+
syncToLiveEdge: true,
|
|
51
|
+
liveEdgeOffset: 3,
|
|
52
|
+
metadataConfig: {
|
|
53
|
+
detectDateRange: true,
|
|
54
|
+
detectID3: true,
|
|
55
|
+
adClassNames: ['com.google.ads', 'ads', 'ad-break']
|
|
56
|
+
},
|
|
57
|
+
onAdStart: () => {
|
|
58
|
+
logAdEvent(`🎬 Ad Started (Mode: ${mode})`);
|
|
59
|
+
},
|
|
60
|
+
onAdEnd: () => {
|
|
61
|
+
logAdEvent('✅ Ad Ended - Resuming Live Stream');
|
|
62
|
+
},
|
|
63
|
+
onAdError: (error) => {
|
|
64
|
+
logAdEvent(`❌ Ad Error: ${error?.getMessage?.() || error}`);
|
|
65
|
+
},
|
|
66
|
+
onAllAdsComplete: () => {
|
|
67
|
+
logAdEvent('✅ All Ads in Pod Completed');
|
|
68
|
+
},
|
|
69
|
+
onLiveAdBreakDetected: (metadata) => {
|
|
70
|
+
logAdEvent(`📍 Live Ad Cue Detected: ${JSON.stringify(metadata).slice(0, 50)}...`);
|
|
71
|
+
},
|
|
72
|
+
onAdBreakScheduled: (scheduledTime) => {
|
|
73
|
+
logAdEvent(`⏰ Ad Break Scheduled at ${scheduledTime.toFixed(0)}s playback time`);
|
|
74
|
+
},
|
|
75
|
+
}, onReady: (player) => {
|
|
76
|
+
console.log('Player ready with live stream ads');
|
|
77
|
+
logAdEvent('🎥 Player Ready');
|
|
78
|
+
}, onError: (error) => {
|
|
79
|
+
console.error('Player error:', error);
|
|
80
|
+
logAdEvent(`❌ Player Error: ${error instanceof Error ? error.message : String(error)}`);
|
|
81
|
+
}, onTimeUpdate: (time) => {
|
|
82
|
+
} })),
|
|
83
|
+
React.createElement("div", { style: {
|
|
84
|
+
padding: '20px',
|
|
85
|
+
backgroundColor: '#f9f9f9',
|
|
86
|
+
borderTop: '1px solid #ddd',
|
|
87
|
+
maxHeight: '200px',
|
|
88
|
+
overflowY: 'auto',
|
|
89
|
+
} },
|
|
90
|
+
React.createElement("h3", { style: { margin: '0 0 10px 0', fontSize: '16px' } }, "Live Ad Events Log:"),
|
|
91
|
+
adEvents.length === 0 ? (React.createElement("p", { style: { color: '#999', margin: 0 } }, "No ad events yet. Play the video to see ads.")) : (React.createElement("ul", { style: { margin: 0, padding: '0 0 0 20px' } }, adEvents.map((event, index) => (React.createElement("li", { key: index, style: { fontSize: '14px', marginBottom: '5px' } }, event)))))),
|
|
92
|
+
React.createElement("div", { style: {
|
|
93
|
+
padding: '20px',
|
|
94
|
+
backgroundColor: '#e7f3ff',
|
|
95
|
+
borderTop: '1px solid #b3d9ff'
|
|
96
|
+
} },
|
|
97
|
+
React.createElement("h3", { style: { margin: '0 0 10px 0', fontSize: '16px' } }, "\uD83D\uDCA1 Implementation Notes:"),
|
|
98
|
+
React.createElement("ul", { style: { margin: 0, paddingLeft: '20px', fontSize: '14px' } },
|
|
99
|
+
React.createElement("li", null,
|
|
100
|
+
React.createElement("strong", null, "Metadata Mode:"),
|
|
101
|
+
" Requires HLS stream with #EXT-X-DATERANGE tags or ID3 metadata. Your encoder must embed ad cues in the manifest."),
|
|
102
|
+
React.createElement("li", null,
|
|
103
|
+
React.createElement("strong", null, "Periodic Mode:"),
|
|
104
|
+
" Works with any live stream. Ads trigger every X seconds of actual playback. Simple but users see ads at different times (not synchronized)."),
|
|
105
|
+
React.createElement("li", null,
|
|
106
|
+
React.createElement("strong", null, "Hybrid Mode:"),
|
|
107
|
+
" Uses metadata when available, falls back to periodic timer. Best of both worlds!"),
|
|
108
|
+
React.createElement("li", null,
|
|
109
|
+
React.createElement("strong", null, "Live Edge Sync:"),
|
|
110
|
+
" After ads, player jumps to live edge (catches up to \"now\"). Disable if you want DVR-style behavior (continue from where paused).")))));
|
|
111
|
+
};
|
|
112
|
+
export const MetadataLiveAdsExample = () => {
|
|
113
|
+
return (React.createElement(WebPlayerView, { url: "https://stream.example.com/live.m3u8", type: "hls", googleAds: {
|
|
114
|
+
adTagUrl: 'https://pubads.g.doubleclick.net/...',
|
|
115
|
+
liveAdBreakMode: 'metadata',
|
|
116
|
+
metadataConfig: {
|
|
117
|
+
detectDateRange: true,
|
|
118
|
+
detectID3: true,
|
|
119
|
+
adClassNames: ['com.google.ads', 'ads']
|
|
120
|
+
},
|
|
121
|
+
syncToLiveEdge: true,
|
|
122
|
+
liveEdgeOffset: 3,
|
|
123
|
+
onLiveAdBreakDetected: (metadata) => {
|
|
124
|
+
console.log('Ad cue detected:', metadata);
|
|
125
|
+
}
|
|
126
|
+
} }));
|
|
127
|
+
};
|
|
128
|
+
export const PeriodicLiveAdsExample = () => {
|
|
129
|
+
return (React.createElement(WebPlayerView, { url: "https://stream.example.com/live.m3u8", type: "hls", googleAds: {
|
|
130
|
+
adTagUrl: 'https://pubads.g.doubleclick.net/...',
|
|
131
|
+
liveAdBreakMode: 'periodic',
|
|
132
|
+
periodicAdInterval: 300,
|
|
133
|
+
syncToLiveEdge: true,
|
|
134
|
+
onAdBreakScheduled: (scheduledTime) => {
|
|
135
|
+
console.log(`Next ad at ${scheduledTime}s playback time`);
|
|
136
|
+
}
|
|
137
|
+
} }));
|
|
138
|
+
};
|
|
139
|
+
export const HybridLiveAdsExample = () => {
|
|
140
|
+
return (React.createElement(WebPlayerView, { url: "https://stream.example.com/live.m3u8", type: "hls", googleAds: {
|
|
141
|
+
adTagUrl: 'https://pubads.g.doubleclick.net/...',
|
|
142
|
+
liveAdBreakMode: 'hybrid',
|
|
143
|
+
metadataConfig: {
|
|
144
|
+
detectDateRange: true,
|
|
145
|
+
detectID3: true
|
|
146
|
+
},
|
|
147
|
+
periodicAdInterval: 300,
|
|
148
|
+
syncToLiveEdge: true,
|
|
149
|
+
onLiveAdBreakDetected: (metadata) => {
|
|
150
|
+
console.log('✅ Metadata ad cue detected');
|
|
151
|
+
},
|
|
152
|
+
onAdBreakScheduled: (scheduledTime) => {
|
|
153
|
+
console.log('⏰ Fallback periodic ad scheduled');
|
|
154
|
+
}
|
|
155
|
+
} }));
|
|
156
|
+
};
|
|
157
|
+
export const BackendControlledLiveAdsExample = () => {
|
|
158
|
+
const [adConfig, setAdConfig] = useState(null);
|
|
159
|
+
React.useEffect(() => {
|
|
160
|
+
fetch('/api/live-stream/ad-config')
|
|
161
|
+
.then(res => res.json())
|
|
162
|
+
.then(config => {
|
|
163
|
+
setAdConfig(config);
|
|
164
|
+
});
|
|
165
|
+
}, []);
|
|
166
|
+
if (!adConfig)
|
|
167
|
+
return React.createElement("div", null, "Loading...");
|
|
168
|
+
return (React.createElement(WebPlayerView, { url: adConfig.streamUrl, type: "hls", googleAds: {
|
|
169
|
+
adTagUrl: adConfig.adTagUrl,
|
|
170
|
+
liveAdBreakMode: adConfig.mode,
|
|
171
|
+
periodicAdInterval: adConfig.periodicInterval,
|
|
172
|
+
metadataConfig: adConfig.metadataConfig,
|
|
173
|
+
syncToLiveEdge: true
|
|
174
|
+
} }));
|
|
175
|
+
};
|
|
176
|
+
export default LiveStreamAdsExample;
|
|
177
|
+
//# sourceMappingURL=live-stream-ads-example.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-stream-ads-example.js","sourceRoot":"","sources":["../../../src/react/examples/live-stream-ads-example.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAWjD,MAAM,CAAC,M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@@ export interface GoogleAdsConfig {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
export class GoogleAdsManager {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
protected video: HTMLVideoElement;
|
|
38
|
+
protected adContainer: HTMLElement;
|
|
39
|
+
protected config: GoogleAdsConfig;
|
|
40
40
|
private adsManager: any = null;
|
|
41
41
|
private adsLoader: any = null;
|
|
42
42
|
private adDisplayContainer: any = null;
|