chunkify-analytics-sdk 0.9.0__py3-none-any.whl
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.
- chunkify_analytics/__init__.py +102 -0
- chunkify_analytics/_base_client.py +2153 -0
- chunkify_analytics/_client.py +1262 -0
- chunkify_analytics/_compat.py +226 -0
- chunkify_analytics/_constants.py +14 -0
- chunkify_analytics/_exceptions.py +108 -0
- chunkify_analytics/_files.py +173 -0
- chunkify_analytics/_models.py +964 -0
- chunkify_analytics/_qs.py +149 -0
- chunkify_analytics/_resource.py +43 -0
- chunkify_analytics/_response.py +835 -0
- chunkify_analytics/_streaming.py +338 -0
- chunkify_analytics/_types.py +274 -0
- chunkify_analytics/_utils/__init__.py +64 -0
- chunkify_analytics/_utils/_compat.py +45 -0
- chunkify_analytics/_utils/_datetime_parse.py +136 -0
- chunkify_analytics/_utils/_json.py +35 -0
- chunkify_analytics/_utils/_logs.py +25 -0
- chunkify_analytics/_utils/_path.py +127 -0
- chunkify_analytics/_utils/_proxy.py +65 -0
- chunkify_analytics/_utils/_reflection.py +42 -0
- chunkify_analytics/_utils/_resources_proxy.py +24 -0
- chunkify_analytics/_utils/_streams.py +12 -0
- chunkify_analytics/_utils/_sync.py +58 -0
- chunkify_analytics/_utils/_transform.py +457 -0
- chunkify_analytics/_utils/_typing.py +156 -0
- chunkify_analytics/_utils/_utils.py +433 -0
- chunkify_analytics/_version.py +4 -0
- chunkify_analytics/lib/.keep +4 -0
- chunkify_analytics/pagination.py +221 -0
- chunkify_analytics/py.typed +0 -0
- chunkify_analytics/resources/__init__.py +243 -0
- chunkify_analytics/resources/admin/__init__.py +33 -0
- chunkify_analytics/resources/admin/admin.py +253 -0
- chunkify_analytics/resources/admin/keys.py +283 -0
- chunkify_analytics/resources/dimensions.py +436 -0
- chunkify_analytics/resources/engagement.py +479 -0
- chunkify_analytics/resources/errors.py +400 -0
- chunkify_analytics/resources/events.py +562 -0
- chunkify_analytics/resources/exports.py +584 -0
- chunkify_analytics/resources/health.py +159 -0
- chunkify_analytics/resources/playback_rates.py +391 -0
- chunkify_analytics/resources/project/__init__.py +33 -0
- chunkify_analytics/resources/project/keys.py +379 -0
- chunkify_analytics/resources/project/project.py +322 -0
- chunkify_analytics/resources/quality.py +471 -0
- chunkify_analytics/resources/renditions.py +391 -0
- chunkify_analytics/resources/retention.py +377 -0
- chunkify_analytics/resources/subtitles.py +389 -0
- chunkify_analytics/resources/summary.py +469 -0
- chunkify_analytics/resources/timeseries.py +399 -0
- chunkify_analytics/resources/videos.py +424 -0
- chunkify_analytics/resources/views.py +579 -0
- chunkify_analytics/types/__init__.py +145 -0
- chunkify_analytics/types/admin/__init__.py +3 -0
- chunkify_analytics/types/admin_create_project_params.py +25 -0
- chunkify_analytics/types/analytics_event.py +32 -0
- chunkify_analytics/types/analytics_event_param.py +30 -0
- chunkify_analytics/types/created_project.py +37 -0
- chunkify_analytics/types/created_project_key.py +34 -0
- chunkify_analytics/types/deleted_project.py +18 -0
- chunkify_analytics/types/dimension_list_values_params.py +124 -0
- chunkify_analytics/types/dimension_values.py +42 -0
- chunkify_analytics/types/engagement.py +60 -0
- chunkify_analytics/types/engagement_breakdown_page.py +44 -0
- chunkify_analytics/types/engagement_response.py +11 -0
- chunkify_analytics/types/engagement_retrieve_params.py +158 -0
- chunkify_analytics/types/engagement_timeseries.py +28 -0
- chunkify_analytics/types/engagement_timeseries_bucket.py +63 -0
- chunkify_analytics/types/error_group.py +17 -0
- chunkify_analytics/types/error_list_params.py +124 -0
- chunkify_analytics/types/error_page.py +14 -0
- chunkify_analytics/types/event_ingest_params.py +19 -0
- chunkify_analytics/types/event_ingest_response.py +11 -0
- chunkify_analytics/types/event_list_params.py +146 -0
- chunkify_analytics/types/event_page.py +18 -0
- chunkify_analytics/types/export.py +18 -0
- chunkify_analytics/types/export_columns.py +12 -0
- chunkify_analytics/types/export_create_params.py +40 -0
- chunkify_analytics/types/export_download_response.py +7 -0
- chunkify_analytics/types/export_list_columns_params.py +69 -0
- chunkify_analytics/types/export_query_param.py +141 -0
- chunkify_analytics/types/health.py +11 -0
- chunkify_analytics/types/metrics.py +13 -0
- chunkify_analytics/types/metrics_breakdown_page.py +40 -0
- chunkify_analytics/types/metrics_response.py +11 -0
- chunkify_analytics/types/native_created.py +13 -0
- chunkify_analytics/types/native_duplicate.py +13 -0
- chunkify_analytics/types/playback_error.py +180 -0
- chunkify_analytics/types/playback_error_param.py +182 -0
- chunkify_analytics/types/playback_rate_changed.py +150 -0
- chunkify_analytics/types/playback_rate_changed_param.py +152 -0
- chunkify_analytics/types/playback_rate_metric.py +21 -0
- chunkify_analytics/types/playback_rate_report.py +31 -0
- chunkify_analytics/types/playback_rate_retrieve_params.py +117 -0
- chunkify_analytics/types/playback_state_changed.py +150 -0
- chunkify_analytics/types/playback_state_changed_param.py +156 -0
- chunkify_analytics/types/project/__init__.py +6 -0
- chunkify_analytics/types/project/key_create_params.py +21 -0
- chunkify_analytics/types/project/project.py +35 -0
- chunkify_analytics/types/project_key.py +21 -0
- chunkify_analytics/types/project_keys.py +14 -0
- chunkify_analytics/types/project_update_params.py +25 -0
- chunkify_analytics/types/quality.py +117 -0
- chunkify_analytics/types/quality_breakdown_page.py +44 -0
- chunkify_analytics/types/quality_response.py +11 -0
- chunkify_analytics/types/quality_retrieve_params.py +158 -0
- chunkify_analytics/types/quality_timeseries.py +28 -0
- chunkify_analytics/types/quality_timeseries_bucket.py +120 -0
- chunkify_analytics/types/rendition_changed.py +156 -0
- chunkify_analytics/types/rendition_changed_param.py +158 -0
- chunkify_analytics/types/rendition_metric.py +40 -0
- chunkify_analytics/types/rendition_report.py +43 -0
- chunkify_analytics/types/rendition_retrieve_params.py +117 -0
- chunkify_analytics/types/retention_bucket.py +22 -0
- chunkify_analytics/types/retention_report.py +33 -0
- chunkify_analytics/types/retention_retrieve_params.py +110 -0
- chunkify_analytics/types/rotated_project_key.py +29 -0
- chunkify_analytics/types/seek_completed.py +166 -0
- chunkify_analytics/types/seek_completed_param.py +168 -0
- chunkify_analytics/types/shared/__init__.py +24 -0
- chunkify_analytics/types/shared/browser_context.py +62 -0
- chunkify_analytics/types/shared/custom_dimensions.py +8 -0
- chunkify_analytics/types/shared/event_context.py +161 -0
- chunkify_analytics/types/shared/event_envelope.py +152 -0
- chunkify_analytics/types/shared/metric_count_ratio.py +18 -0
- chunkify_analytics/types/shared/otlp_any_value.py +56 -0
- chunkify_analytics/types/shared/otlp_attribute.py +24 -0
- chunkify_analytics/types/shared/otlp_attribute_value.py +136 -0
- chunkify_analytics/types/shared/otlp_context_attribute.py +22 -0
- chunkify_analytics/types/shared/otlp_log_record.py +48 -0
- chunkify_analytics/types/shared/otlp_resource.py +20 -0
- chunkify_analytics/types/shared/otlp_scope.py +24 -0
- chunkify_analytics/types/shared/playback_rate_playing_time.py +12 -0
- chunkify_analytics/types/shared/playback_score.py +28 -0
- chunkify_analytics/types/shared/played_range.py +13 -0
- chunkify_analytics/types/shared/progress_reached.py +39 -0
- chunkify_analytics/types/shared/rendition_playing_time.py +21 -0
- chunkify_analytics/types/shared/startup_outcomes.py +39 -0
- chunkify_analytics/types/shared/stored_otlp_context.py +50 -0
- chunkify_analytics/types/shared/subtitle_playing_time.py +14 -0
- chunkify_analytics/types/shared/view_metrics.py +100 -0
- chunkify_analytics/types/shared/watch_time_distribution.py +41 -0
- chunkify_analytics/types/shared_params/__init__.py +8 -0
- chunkify_analytics/types/shared_params/browser_context.py +62 -0
- chunkify_analytics/types/shared_params/custom_dimensions.py +10 -0
- chunkify_analytics/types/shared_params/playback_rate_playing_time.py +14 -0
- chunkify_analytics/types/shared_params/played_range.py +15 -0
- chunkify_analytics/types/shared_params/rendition_playing_time.py +22 -0
- chunkify_analytics/types/shared_params/subtitle_playing_time.py +15 -0
- chunkify_analytics/types/stored_event.py +44 -0
- chunkify_analytics/types/subtitle_changed.py +150 -0
- chunkify_analytics/types/subtitle_changed_param.py +152 -0
- chunkify_analytics/types/subtitle_metric.py +26 -0
- chunkify_analytics/types/subtitle_report.py +31 -0
- chunkify_analytics/types/subtitle_retrieve_params.py +117 -0
- chunkify_analytics/types/summary_retrieve_params.py +158 -0
- chunkify_analytics/types/time_bucket.py +22 -0
- chunkify_analytics/types/timeseries.py +28 -0
- chunkify_analytics/types/timeseries_response.py +12 -0
- chunkify_analytics/types/timesery_retrieve_params.py +115 -0
- chunkify_analytics/types/video_list_params.py +140 -0
- chunkify_analytics/types/video_metrics.py +23 -0
- chunkify_analytics/types/video_page.py +14 -0
- chunkify_analytics/types/view.py +43 -0
- chunkify_analytics/types/view_detail.py +21 -0
- chunkify_analytics/types/view_ended.py +180 -0
- chunkify_analytics/types/view_ended_param.py +182 -0
- chunkify_analytics/types/view_list_params.py +152 -0
- chunkify_analytics/types/view_page.py +14 -0
- chunkify_analytics/types/view_retrieve_params.py +23 -0
- chunkify_analytics/types/view_snapshot.py +180 -0
- chunkify_analytics/types/view_snapshot_param.py +182 -0
- chunkify_analytics/types/view_started.py +192 -0
- chunkify_analytics/types/view_started_param.py +194 -0
- chunkify_analytics_sdk-0.9.0.dist-info/METADATA +487 -0
- chunkify_analytics_sdk-0.9.0.dist-info/RECORD +179 -0
- chunkify_analytics_sdk-0.9.0.dist-info/WHEEL +4 -0
- chunkify_analytics_sdk-0.9.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Union, Iterable, Optional
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from .._utils import PropertyInfo
|
|
10
|
+
from .shared_params.played_range import PlayedRange
|
|
11
|
+
from .shared_params.browser_context import BrowserContext
|
|
12
|
+
from .shared_params.subtitle_playing_time import SubtitlePlayingTime
|
|
13
|
+
from .shared_params.rendition_playing_time import RenditionPlayingTime
|
|
14
|
+
from .shared_params.playback_rate_playing_time import PlaybackRatePlayingTime
|
|
15
|
+
|
|
16
|
+
__all__ = ["ViewSnapshotParam"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class ViewSnapshotParam(TypedDict, total=False):
|
|
20
|
+
connector_name: Required[str]
|
|
21
|
+
|
|
22
|
+
connector_version: Required[Optional[str]]
|
|
23
|
+
|
|
24
|
+
delivery_hostname: Required[Optional[str]]
|
|
25
|
+
|
|
26
|
+
delivery_request_count: Required[Optional[float]]
|
|
27
|
+
|
|
28
|
+
delivery_throughput_bps: Required[Optional[float]]
|
|
29
|
+
|
|
30
|
+
delivery_transferred_bytes: Required[Optional[float]]
|
|
31
|
+
|
|
32
|
+
dropped_video_frames: Required[Optional[float]]
|
|
33
|
+
|
|
34
|
+
environment: Required[Optional[str]]
|
|
35
|
+
|
|
36
|
+
error_category: Required[Optional[Literal["aborted", "network", "decode", "unsupported", "unknown"]]]
|
|
37
|
+
|
|
38
|
+
error_code: Required[Union[str, float, None]]
|
|
39
|
+
|
|
40
|
+
error_fatal: Required[Optional[bool]]
|
|
41
|
+
|
|
42
|
+
error_playhead_seconds: Required[Optional[float]]
|
|
43
|
+
|
|
44
|
+
event_id: Required[str]
|
|
45
|
+
|
|
46
|
+
event_name: Required[Literal["chunkify.video.view_snapshot"]]
|
|
47
|
+
|
|
48
|
+
first_video_frame_time_ms: Required[Optional[float]]
|
|
49
|
+
|
|
50
|
+
furthest_progress_ratio: Required[Optional[float]]
|
|
51
|
+
|
|
52
|
+
maximum_playhead_seconds: Required[float]
|
|
53
|
+
|
|
54
|
+
media_duration_seconds: Required[Optional[float]]
|
|
55
|
+
|
|
56
|
+
media_height_px: Required[Optional[float]]
|
|
57
|
+
|
|
58
|
+
media_width_px: Required[Optional[float]]
|
|
59
|
+
|
|
60
|
+
occurred_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
|
|
61
|
+
|
|
62
|
+
player_height_px: Required[Optional[float]]
|
|
63
|
+
|
|
64
|
+
player_name: Required[Optional[str]]
|
|
65
|
+
|
|
66
|
+
player_version: Required[Optional[str]]
|
|
67
|
+
|
|
68
|
+
player_width_px: Required[Optional[float]]
|
|
69
|
+
|
|
70
|
+
playing_time_ms: Required[float]
|
|
71
|
+
|
|
72
|
+
reason: Required[Optional[Literal["ended", "destroyed", "source_changed", "page_exit"]]]
|
|
73
|
+
|
|
74
|
+
rebuffer_count: Required[float]
|
|
75
|
+
|
|
76
|
+
rebuffer_duration_ms: Required[float]
|
|
77
|
+
|
|
78
|
+
rebuffer_ratio: Required[Optional[float]]
|
|
79
|
+
|
|
80
|
+
rendition_playing_time: Required[Optional[Iterable[RenditionPlayingTime]]]
|
|
81
|
+
|
|
82
|
+
rendition_switch_count: Required[Optional[float]]
|
|
83
|
+
|
|
84
|
+
schema_version: Required[Literal[1]]
|
|
85
|
+
|
|
86
|
+
sdk_name: Required[str]
|
|
87
|
+
"""Name of the SDK or integration that produced the event.
|
|
88
|
+
|
|
89
|
+
Informational metadata, preserved as received. Must contain at least one
|
|
90
|
+
non-whitespace character.
|
|
91
|
+
"""
|
|
92
|
+
|
|
93
|
+
sdk_version: Required[str]
|
|
94
|
+
|
|
95
|
+
seek_count: Required[float]
|
|
96
|
+
|
|
97
|
+
seek_duration_ms: Required[float]
|
|
98
|
+
|
|
99
|
+
selected_rendition_bitrate_bps: Required[Optional[float]]
|
|
100
|
+
|
|
101
|
+
selected_rendition_codec: Required[Optional[str]]
|
|
102
|
+
|
|
103
|
+
selected_rendition_height: Required[Optional[float]]
|
|
104
|
+
|
|
105
|
+
selected_rendition_width: Required[Optional[float]]
|
|
106
|
+
|
|
107
|
+
sequence: Required[int]
|
|
108
|
+
|
|
109
|
+
startup_outcome: Required[Optional[Literal["started", "failed_before_start", "ended_before_start"]]]
|
|
110
|
+
|
|
111
|
+
startup_time_ms: Required[Optional[float]]
|
|
112
|
+
|
|
113
|
+
total_video_frames: Required[Optional[float]]
|
|
114
|
+
|
|
115
|
+
video_id: Required[str]
|
|
116
|
+
|
|
117
|
+
view_id: Required[str]
|
|
118
|
+
|
|
119
|
+
viewer_id: Required[Optional[str]]
|
|
120
|
+
"""
|
|
121
|
+
Anonymous browser identifier generated by the Chunkify player SDK and stored in
|
|
122
|
+
the page's localStorage.
|
|
123
|
+
"""
|
|
124
|
+
|
|
125
|
+
browser_context: Optional[BrowserContext]
|
|
126
|
+
"""Browser and device information.
|
|
127
|
+
|
|
128
|
+
The Chunkify player sends every field, with null for unavailable measurements.
|
|
129
|
+
Other integrations may omit any field except schema_version. Extra properties
|
|
130
|
+
are preserved.
|
|
131
|
+
"""
|
|
132
|
+
|
|
133
|
+
playback_rate: Optional[float]
|
|
134
|
+
"""
|
|
135
|
+
Current playback rate, rounded to two decimals, such as 1, 1.5 or 2; from 0.01
|
|
136
|
+
to 16. Optional.
|
|
137
|
+
"""
|
|
138
|
+
|
|
139
|
+
playback_rate_playing_time: Optional[Iterable[PlaybackRatePlayingTime]]
|
|
140
|
+
"""Cumulative playing time per playback rate for this attempt.
|
|
141
|
+
|
|
142
|
+
At most 32 entries. Optional.
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
played_ranges: Optional[Iterable[PlayedRange]]
|
|
146
|
+
"""
|
|
147
|
+
Cumulative played media ranges for this attempt, sorted and merged without
|
|
148
|
+
overlaps. Seeking, pauses and buffering are excluded. Missing or null means
|
|
149
|
+
unavailable; an empty array means measured but no section played. Replaying a
|
|
150
|
+
section does not add another range.
|
|
151
|
+
"""
|
|
152
|
+
|
|
153
|
+
playhead_seconds: Optional[float]
|
|
154
|
+
"""Current media position at this event, not the maximum reached."""
|
|
155
|
+
|
|
156
|
+
subtitle_language: Optional[str]
|
|
157
|
+
"""
|
|
158
|
+
Language tag (BCP 47) of the showing subtitles or captions track; und when the
|
|
159
|
+
track declares no language; null when subtitles are off. Optional.
|
|
160
|
+
"""
|
|
161
|
+
|
|
162
|
+
subtitle_playing_time: Optional[Iterable[SubtitlePlayingTime]]
|
|
163
|
+
"""
|
|
164
|
+
Cumulative playing time per subtitle language for this attempt, null language
|
|
165
|
+
meaning subtitles off. At most 32 entries. Optional.
|
|
166
|
+
"""
|
|
167
|
+
|
|
168
|
+
user_id: Optional[str]
|
|
169
|
+
"""
|
|
170
|
+
Optional integrator-supplied user ID, used to link views to the integrator's own
|
|
171
|
+
users.
|
|
172
|
+
"""
|
|
173
|
+
|
|
174
|
+
video_title: Optional[str]
|
|
175
|
+
"""Optional human-readable video title for reports."""
|
|
176
|
+
|
|
177
|
+
visibility_state: Optional[Literal["visible", "hidden"]]
|
|
178
|
+
"""Tab visibility when the event was recorded.
|
|
179
|
+
|
|
180
|
+
Hidden does not imply paused playback or identify the cause of a pause. Missing
|
|
181
|
+
on older events; null when unavailable.
|
|
182
|
+
"""
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from typing import List, Union, Optional
|
|
4
|
+
from datetime import datetime
|
|
5
|
+
from typing_extensions import Literal
|
|
6
|
+
|
|
7
|
+
from .._models import BaseModel
|
|
8
|
+
from .shared.played_range import PlayedRange
|
|
9
|
+
from .shared.browser_context import BrowserContext
|
|
10
|
+
from .shared.custom_dimensions import CustomDimensions
|
|
11
|
+
from .shared.subtitle_playing_time import SubtitlePlayingTime
|
|
12
|
+
from .shared.rendition_playing_time import RenditionPlayingTime
|
|
13
|
+
from .shared.playback_rate_playing_time import PlaybackRatePlayingTime
|
|
14
|
+
|
|
15
|
+
__all__ = ["ViewStarted"]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class ViewStarted(BaseModel):
|
|
19
|
+
connector_name: str
|
|
20
|
+
|
|
21
|
+
connector_version: Optional[str] = None
|
|
22
|
+
|
|
23
|
+
delivery_hostname: Optional[str] = None
|
|
24
|
+
|
|
25
|
+
delivery_request_count: Optional[float] = None
|
|
26
|
+
|
|
27
|
+
delivery_throughput_bps: Optional[float] = None
|
|
28
|
+
|
|
29
|
+
delivery_transferred_bytes: Optional[float] = None
|
|
30
|
+
|
|
31
|
+
dropped_video_frames: Optional[float] = None
|
|
32
|
+
|
|
33
|
+
environment: Optional[str] = None
|
|
34
|
+
|
|
35
|
+
error_category: Optional[Literal["aborted", "network", "decode", "unsupported", "unknown"]] = None
|
|
36
|
+
|
|
37
|
+
error_code: Union[str, float, None] = None
|
|
38
|
+
|
|
39
|
+
error_fatal: Optional[bool] = None
|
|
40
|
+
|
|
41
|
+
error_playhead_seconds: Optional[float] = None
|
|
42
|
+
|
|
43
|
+
event_id: str
|
|
44
|
+
|
|
45
|
+
event_name: Literal["chunkify.video.view_started"]
|
|
46
|
+
|
|
47
|
+
first_video_frame_time_ms: Optional[float] = None
|
|
48
|
+
|
|
49
|
+
furthest_progress_ratio: Optional[float] = None
|
|
50
|
+
|
|
51
|
+
maximum_playhead_seconds: float
|
|
52
|
+
|
|
53
|
+
media_duration_seconds: Optional[float] = None
|
|
54
|
+
|
|
55
|
+
media_height_px: Optional[float] = None
|
|
56
|
+
|
|
57
|
+
media_width_px: Optional[float] = None
|
|
58
|
+
|
|
59
|
+
occurred_at: datetime
|
|
60
|
+
|
|
61
|
+
player_height_px: Optional[float] = None
|
|
62
|
+
|
|
63
|
+
player_name: Optional[str] = None
|
|
64
|
+
|
|
65
|
+
player_version: Optional[str] = None
|
|
66
|
+
|
|
67
|
+
player_width_px: Optional[float] = None
|
|
68
|
+
|
|
69
|
+
playing_time_ms: float
|
|
70
|
+
|
|
71
|
+
reason: Optional[Literal["ended", "destroyed", "source_changed", "page_exit"]] = None
|
|
72
|
+
|
|
73
|
+
rebuffer_count: float
|
|
74
|
+
|
|
75
|
+
rebuffer_duration_ms: float
|
|
76
|
+
|
|
77
|
+
rebuffer_ratio: Optional[float] = None
|
|
78
|
+
|
|
79
|
+
rendition_playing_time: Optional[List[RenditionPlayingTime]] = None
|
|
80
|
+
|
|
81
|
+
rendition_switch_count: Optional[float] = None
|
|
82
|
+
|
|
83
|
+
schema_version: Literal[1]
|
|
84
|
+
|
|
85
|
+
sdk_name: str
|
|
86
|
+
"""Name of the SDK or integration that produced the event.
|
|
87
|
+
|
|
88
|
+
Informational metadata, preserved as received. Must contain at least one
|
|
89
|
+
non-whitespace character.
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
sdk_version: str
|
|
93
|
+
|
|
94
|
+
seek_count: float
|
|
95
|
+
|
|
96
|
+
seek_duration_ms: float
|
|
97
|
+
|
|
98
|
+
selected_rendition_bitrate_bps: Optional[float] = None
|
|
99
|
+
|
|
100
|
+
selected_rendition_codec: Optional[str] = None
|
|
101
|
+
|
|
102
|
+
selected_rendition_height: Optional[float] = None
|
|
103
|
+
|
|
104
|
+
selected_rendition_width: Optional[float] = None
|
|
105
|
+
|
|
106
|
+
sequence: int
|
|
107
|
+
|
|
108
|
+
startup_outcome: Optional[Literal["started", "failed_before_start", "ended_before_start"]] = None
|
|
109
|
+
|
|
110
|
+
startup_time_ms: Optional[float] = None
|
|
111
|
+
|
|
112
|
+
total_video_frames: Optional[float] = None
|
|
113
|
+
|
|
114
|
+
video_id: str
|
|
115
|
+
|
|
116
|
+
view_id: str
|
|
117
|
+
|
|
118
|
+
viewer_id: Optional[str] = None
|
|
119
|
+
"""
|
|
120
|
+
Anonymous browser identifier generated by the Chunkify player SDK and stored in
|
|
121
|
+
the page's localStorage.
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
browser_context: Optional[BrowserContext] = None
|
|
125
|
+
"""Browser and device information.
|
|
126
|
+
|
|
127
|
+
The Chunkify player sends every field, with null for unavailable measurements.
|
|
128
|
+
Other integrations may omit any field except schema_version. Extra properties
|
|
129
|
+
are preserved.
|
|
130
|
+
"""
|
|
131
|
+
|
|
132
|
+
custom: Optional[CustomDimensions] = None
|
|
133
|
+
"""
|
|
134
|
+
Integrator-defined dimensions set once when the view starts: at most 10 keys of
|
|
135
|
+
1 to 40 characters a-z, 0-9 and \\__, each with text of 1 to 256 characters, a
|
|
136
|
+
number or a boolean. Reports compare values as text, exactly and
|
|
137
|
+
case-sensitively: numbers as their JSON text (5, 5.5; send whole numbers without
|
|
138
|
+
a decimal part, as JavaScript does), booleans as true or false. Only
|
|
139
|
+
view_started accepts custom. Never put personal data here; use user_id for user
|
|
140
|
+
identity.
|
|
141
|
+
"""
|
|
142
|
+
|
|
143
|
+
playback_rate: Optional[float] = None
|
|
144
|
+
"""
|
|
145
|
+
Current playback rate, rounded to two decimals, such as 1, 1.5 or 2; from 0.01
|
|
146
|
+
to 16. Optional.
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
playback_rate_playing_time: Optional[List[PlaybackRatePlayingTime]] = None
|
|
150
|
+
"""Cumulative playing time per playback rate for this attempt.
|
|
151
|
+
|
|
152
|
+
At most 32 entries. Optional.
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
played_ranges: Optional[List[PlayedRange]] = None
|
|
156
|
+
"""
|
|
157
|
+
Cumulative played media ranges for this attempt, sorted and merged without
|
|
158
|
+
overlaps. Seeking, pauses and buffering are excluded. Missing or null means
|
|
159
|
+
unavailable; an empty array means measured but no section played. Replaying a
|
|
160
|
+
section does not add another range.
|
|
161
|
+
"""
|
|
162
|
+
|
|
163
|
+
playhead_seconds: Optional[float] = None
|
|
164
|
+
"""Current media position at this event, not the maximum reached."""
|
|
165
|
+
|
|
166
|
+
subtitle_language: Optional[str] = None
|
|
167
|
+
"""
|
|
168
|
+
Language tag (BCP 47) of the showing subtitles or captions track; und when the
|
|
169
|
+
track declares no language; null when subtitles are off. Optional.
|
|
170
|
+
"""
|
|
171
|
+
|
|
172
|
+
subtitle_playing_time: Optional[List[SubtitlePlayingTime]] = None
|
|
173
|
+
"""
|
|
174
|
+
Cumulative playing time per subtitle language for this attempt, null language
|
|
175
|
+
meaning subtitles off. At most 32 entries. Optional.
|
|
176
|
+
"""
|
|
177
|
+
|
|
178
|
+
user_id: Optional[str] = None
|
|
179
|
+
"""
|
|
180
|
+
Optional integrator-supplied user ID, used to link views to the integrator's own
|
|
181
|
+
users.
|
|
182
|
+
"""
|
|
183
|
+
|
|
184
|
+
video_title: Optional[str] = None
|
|
185
|
+
"""Optional human-readable video title for reports."""
|
|
186
|
+
|
|
187
|
+
visibility_state: Optional[Literal["visible", "hidden"]] = None
|
|
188
|
+
"""Tab visibility when the event was recorded.
|
|
189
|
+
|
|
190
|
+
Hidden does not imply paused playback or identify the cause of a pause. Missing
|
|
191
|
+
on older events; null when unavailable.
|
|
192
|
+
"""
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import Union, Iterable, Optional
|
|
6
|
+
from datetime import datetime
|
|
7
|
+
from typing_extensions import Literal, Required, Annotated, TypedDict
|
|
8
|
+
|
|
9
|
+
from .._utils import PropertyInfo
|
|
10
|
+
from .shared_params.played_range import PlayedRange
|
|
11
|
+
from .shared_params.browser_context import BrowserContext
|
|
12
|
+
from .shared_params.custom_dimensions import CustomDimensions
|
|
13
|
+
from .shared_params.subtitle_playing_time import SubtitlePlayingTime
|
|
14
|
+
from .shared_params.rendition_playing_time import RenditionPlayingTime
|
|
15
|
+
from .shared_params.playback_rate_playing_time import PlaybackRatePlayingTime
|
|
16
|
+
|
|
17
|
+
__all__ = ["ViewStartedParam"]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class ViewStartedParam(TypedDict, total=False):
|
|
21
|
+
connector_name: Required[str]
|
|
22
|
+
|
|
23
|
+
connector_version: Required[Optional[str]]
|
|
24
|
+
|
|
25
|
+
delivery_hostname: Required[Optional[str]]
|
|
26
|
+
|
|
27
|
+
delivery_request_count: Required[Optional[float]]
|
|
28
|
+
|
|
29
|
+
delivery_throughput_bps: Required[Optional[float]]
|
|
30
|
+
|
|
31
|
+
delivery_transferred_bytes: Required[Optional[float]]
|
|
32
|
+
|
|
33
|
+
dropped_video_frames: Required[Optional[float]]
|
|
34
|
+
|
|
35
|
+
environment: Required[Optional[str]]
|
|
36
|
+
|
|
37
|
+
error_category: Required[Optional[Literal["aborted", "network", "decode", "unsupported", "unknown"]]]
|
|
38
|
+
|
|
39
|
+
error_code: Required[Union[str, float, None]]
|
|
40
|
+
|
|
41
|
+
error_fatal: Required[Optional[bool]]
|
|
42
|
+
|
|
43
|
+
error_playhead_seconds: Required[Optional[float]]
|
|
44
|
+
|
|
45
|
+
event_id: Required[str]
|
|
46
|
+
|
|
47
|
+
event_name: Required[Literal["chunkify.video.view_started"]]
|
|
48
|
+
|
|
49
|
+
first_video_frame_time_ms: Required[Optional[float]]
|
|
50
|
+
|
|
51
|
+
furthest_progress_ratio: Required[Optional[float]]
|
|
52
|
+
|
|
53
|
+
maximum_playhead_seconds: Required[float]
|
|
54
|
+
|
|
55
|
+
media_duration_seconds: Required[Optional[float]]
|
|
56
|
+
|
|
57
|
+
media_height_px: Required[Optional[float]]
|
|
58
|
+
|
|
59
|
+
media_width_px: Required[Optional[float]]
|
|
60
|
+
|
|
61
|
+
occurred_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]]
|
|
62
|
+
|
|
63
|
+
player_height_px: Required[Optional[float]]
|
|
64
|
+
|
|
65
|
+
player_name: Required[Optional[str]]
|
|
66
|
+
|
|
67
|
+
player_version: Required[Optional[str]]
|
|
68
|
+
|
|
69
|
+
player_width_px: Required[Optional[float]]
|
|
70
|
+
|
|
71
|
+
playing_time_ms: Required[float]
|
|
72
|
+
|
|
73
|
+
reason: Required[Optional[Literal["ended", "destroyed", "source_changed", "page_exit"]]]
|
|
74
|
+
|
|
75
|
+
rebuffer_count: Required[float]
|
|
76
|
+
|
|
77
|
+
rebuffer_duration_ms: Required[float]
|
|
78
|
+
|
|
79
|
+
rebuffer_ratio: Required[Optional[float]]
|
|
80
|
+
|
|
81
|
+
rendition_playing_time: Required[Optional[Iterable[RenditionPlayingTime]]]
|
|
82
|
+
|
|
83
|
+
rendition_switch_count: Required[Optional[float]]
|
|
84
|
+
|
|
85
|
+
schema_version: Required[Literal[1]]
|
|
86
|
+
|
|
87
|
+
sdk_name: Required[str]
|
|
88
|
+
"""Name of the SDK or integration that produced the event.
|
|
89
|
+
|
|
90
|
+
Informational metadata, preserved as received. Must contain at least one
|
|
91
|
+
non-whitespace character.
|
|
92
|
+
"""
|
|
93
|
+
|
|
94
|
+
sdk_version: Required[str]
|
|
95
|
+
|
|
96
|
+
seek_count: Required[float]
|
|
97
|
+
|
|
98
|
+
seek_duration_ms: Required[float]
|
|
99
|
+
|
|
100
|
+
selected_rendition_bitrate_bps: Required[Optional[float]]
|
|
101
|
+
|
|
102
|
+
selected_rendition_codec: Required[Optional[str]]
|
|
103
|
+
|
|
104
|
+
selected_rendition_height: Required[Optional[float]]
|
|
105
|
+
|
|
106
|
+
selected_rendition_width: Required[Optional[float]]
|
|
107
|
+
|
|
108
|
+
sequence: Required[int]
|
|
109
|
+
|
|
110
|
+
startup_outcome: Required[Optional[Literal["started", "failed_before_start", "ended_before_start"]]]
|
|
111
|
+
|
|
112
|
+
startup_time_ms: Required[Optional[float]]
|
|
113
|
+
|
|
114
|
+
total_video_frames: Required[Optional[float]]
|
|
115
|
+
|
|
116
|
+
video_id: Required[str]
|
|
117
|
+
|
|
118
|
+
view_id: Required[str]
|
|
119
|
+
|
|
120
|
+
viewer_id: Required[Optional[str]]
|
|
121
|
+
"""
|
|
122
|
+
Anonymous browser identifier generated by the Chunkify player SDK and stored in
|
|
123
|
+
the page's localStorage.
|
|
124
|
+
"""
|
|
125
|
+
|
|
126
|
+
browser_context: Optional[BrowserContext]
|
|
127
|
+
"""Browser and device information.
|
|
128
|
+
|
|
129
|
+
The Chunkify player sends every field, with null for unavailable measurements.
|
|
130
|
+
Other integrations may omit any field except schema_version. Extra properties
|
|
131
|
+
are preserved.
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
custom: CustomDimensions
|
|
135
|
+
"""
|
|
136
|
+
Integrator-defined dimensions set once when the view starts: at most 10 keys of
|
|
137
|
+
1 to 40 characters a-z, 0-9 and \\__, each with text of 1 to 256 characters, a
|
|
138
|
+
number or a boolean. Reports compare values as text, exactly and
|
|
139
|
+
case-sensitively: numbers as their JSON text (5, 5.5; send whole numbers without
|
|
140
|
+
a decimal part, as JavaScript does), booleans as true or false. Only
|
|
141
|
+
view_started accepts custom. Never put personal data here; use user_id for user
|
|
142
|
+
identity.
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
playback_rate: Optional[float]
|
|
146
|
+
"""
|
|
147
|
+
Current playback rate, rounded to two decimals, such as 1, 1.5 or 2; from 0.01
|
|
148
|
+
to 16. Optional.
|
|
149
|
+
"""
|
|
150
|
+
|
|
151
|
+
playback_rate_playing_time: Optional[Iterable[PlaybackRatePlayingTime]]
|
|
152
|
+
"""Cumulative playing time per playback rate for this attempt.
|
|
153
|
+
|
|
154
|
+
At most 32 entries. Optional.
|
|
155
|
+
"""
|
|
156
|
+
|
|
157
|
+
played_ranges: Optional[Iterable[PlayedRange]]
|
|
158
|
+
"""
|
|
159
|
+
Cumulative played media ranges for this attempt, sorted and merged without
|
|
160
|
+
overlaps. Seeking, pauses and buffering are excluded. Missing or null means
|
|
161
|
+
unavailable; an empty array means measured but no section played. Replaying a
|
|
162
|
+
section does not add another range.
|
|
163
|
+
"""
|
|
164
|
+
|
|
165
|
+
playhead_seconds: Optional[float]
|
|
166
|
+
"""Current media position at this event, not the maximum reached."""
|
|
167
|
+
|
|
168
|
+
subtitle_language: Optional[str]
|
|
169
|
+
"""
|
|
170
|
+
Language tag (BCP 47) of the showing subtitles or captions track; und when the
|
|
171
|
+
track declares no language; null when subtitles are off. Optional.
|
|
172
|
+
"""
|
|
173
|
+
|
|
174
|
+
subtitle_playing_time: Optional[Iterable[SubtitlePlayingTime]]
|
|
175
|
+
"""
|
|
176
|
+
Cumulative playing time per subtitle language for this attempt, null language
|
|
177
|
+
meaning subtitles off. At most 32 entries. Optional.
|
|
178
|
+
"""
|
|
179
|
+
|
|
180
|
+
user_id: Optional[str]
|
|
181
|
+
"""
|
|
182
|
+
Optional integrator-supplied user ID, used to link views to the integrator's own
|
|
183
|
+
users.
|
|
184
|
+
"""
|
|
185
|
+
|
|
186
|
+
video_title: Optional[str]
|
|
187
|
+
"""Optional human-readable video title for reports."""
|
|
188
|
+
|
|
189
|
+
visibility_state: Optional[Literal["visible", "hidden"]]
|
|
190
|
+
"""Tab visibility when the event was recorded.
|
|
191
|
+
|
|
192
|
+
Hidden does not imply paused playback or identify the cause of a pause. Missing
|
|
193
|
+
on older events; null when unavailable.
|
|
194
|
+
"""
|