LifeMate — Personal, Family & Learning Companion

fix/sms-approval-gates
chore/phase1-repository-cleanup deploy/stable-web-apk deployment-static design/mobile-accessibility-v2 design/mobile-navigation-review docs/child-education-access-decision docs/offline-data-rescue-options docs/owner-guide-and-delivery-plan docs/phase1-policy-options docs/public-review-live-2026-10-15 feat/aparat-learning-library feat/child-device-safety feat/child-identity-schema feat/flutter-mobile-navigation feat/learning-content-operations feat/local-signing-preflight feat/online-family-stage0 feat/personal-encrypted-recovery feat/private-planner-series-api feat/public-review-page feat/standalone-weekly-planner feat/weekly-planner-android final-feature-1/iran-family-school fix/auth-abuse-expiry-safety fix/auth-expiry-after-lock fix/backend-request-safety fix/lifeguide-bootstrap-naming-ci fix/lifeguide-pages-qa-base-preflight fix/lifeguide-qa-pages-env-deployment fix/local-task-persistence fix/managed-child-session-boundary fix/personal-jalali-dates fix/personal-notification-controls fix/personal-upgrade-delivery-guard fix/sms-approval-gates fix/study-duration-display infra/cloudflare-neon-migration infra/lifeguide-cloudflare-qa infra/lifeguide-github-pages-qa infra/lifeguide-supabase-qa main phase-1/foundation-completion phase-2/product-foundation-identity phase-3/planner-school-family-core phase-4/ai-learning-wellbeing phase-5/hardening-observability-release test/android-reminder-acceptance test/personal-notification-settings test/personal-recovery-acceptance test/role-entry-apk
md 132 lines 7.46 KB
Rendered Raw
1 # Aparat official embedded player: research and boundary
2
3 Checked on 2026-10-09. This is public-source research and a paused player-frame
4 probe, followed by client component tests. No video was played, downloaded,
5 rehosted or transcribed. No provider account, user data or credentials were used.
6
7 ## Official frame and sources
8
9 The official JavaScript endpoint
10 [`https://www.aparat.com/embed/rod03i6`](https://www.aparat.com/embed/rod03i6)
11 returned HTTP200 over verified HTTPS. It creates an iframe with fullscreen
12 attributes and this address:
13
14 ```text
15 https://www.aparat.com/video/video/embed/videohash/{videoHash}/vt/frame
16 ```
17
18 The public example `rod03i6` is a 54-second embed-code tutorial, **not an approved
19 school lesson or a catalog seed**. Its public metadata endpoint
20 [`/etc/api/video/videohash/rod03i6`](https://www.aparat.com/etc/api/video/videohash/rod03i6)
21 returned HTTP200; the frame also returned HTTP200. The official embed script
22 does not add autoplay parameters by default. The frame is a provider-controlled
23 JavaScript application, not a direct video-file URL.
24
25 Relevant official public sources:
26
27 - [Aparat editorial explanation of embedding](https://aparat.blog/what-is-embed/)
28 describes the supported embed flow, attribution/view counts, adaptive quality
29 and optional autoplay settings. It explains embedding videos without hosting
30 another copy; it does not grant blanket rights to arbitrary third-party lessons.
31 - [Official upload guidance](https://support.aparat.com/kb/articles/article-94)
32 describes copyright enforcement and inappropriate-for-children settings.
33 Those uploader controls do not certify every public video as suitable for minors.
34 - [Official revenue-sharing page](https://www.aparat.com/income/) establishes
35 that advertising is part of the provider's service. Exact ad behavior in an
36 embedded school lesson was not verified.
37 - [Main-service rules](https://www.aparat.com/etc/main/rules) returned HTTP403;
38 a search-provider fetch also timed out. The full current terms and privacy
39 policy remain **UNVERIFIED**. Rules from Aparat Kids/Music were not substituted.
40
41 Keep provider branding and controls. Do not fetch file variants, strip ads,
42 scrape playback into another player, infer permission from public availability,
43 or claim ad-free, cookie-free or age-filtered playback. Catalog publishing still
44 requires separate content suitability and rights review.
45
46 ## Client contract
47
48 `AparatPlayer(videoHash: ..., title: ...)` accepts a case-preserving ASCII
49 alphanumeric hash of 5–64 characters. It rejects URLs, slashes, escapes, query
50 strings, whitespace and other scripts. The component constructs the official
51 HTTPS frame URI itself. No caller-supplied HTML, media URL, app token, account ID,
52 callback URL or autoplay parameter is forwarded.
53
54 The Persian explanation and an explicit **بارگذاری ویدئو از آپارات** button appear
55 before creating the remote platform view. Selecting another video requires a new
56 click. Close, route disposal and paused/hidden app lifecycle remove the view.
57 Load errors and a 30-second frame-document timeout offer an explicit retry;
58 frame readiness is not reported as successful playback or recorded study.
59
60 Web/PWA uses `HtmlElementView.fromTagName('iframe')`, with restrictions set before
61 attachment and `src` assignment:
62
63 ```text
64 referrerpolicy="no-referrer"
65 sandbox="allow-scripts allow-same-origin"
66 allow="fullscreen; autoplay 'none'; camera 'none'; microphone 'none';
67 geolocation 'none'; payment 'none'"
68 allowfullscreen
69 ```
70
71 The cross-origin frame needs scripts and its own origin for provider resources.
72 Top navigation, popups, downloads and forms are not granted by the sandbox.
73 The app's CSP needs `frame-src https://www.aparat.com`; app script/connect/font
74 sources should remain local. The child document has its own network and policy
75 context. Browsers may fire iframe `load` for a provider error page, so this event
76 cannot prove media availability or viewing.
77
78 Android uses official `webview_flutter`4.14.1 and Android implementation4.14.1.
79 JavaScript is enabled for the provider; no JavaScript bridge or app headers are
80 installed. Media requires a user gesture, third-party cookies and geolocation are
81 disabled, mixed content is forbidden and permission requests are denied. TLS
82 errors cancel. Initial controller loading is validated separately because it does
83 not pass through the navigation delegate.
84
85 Main-document navigation permits only HTTPS, port443, `www.aparat.com` or
86 `aparat.com`, and the exact selected embed path, with no userinfo/query/fragment.
87 Other redirects and app protocols are prevented. The native delegate is **not a
88 CDN/subframe resource firewall**. First-party provider cookies can still exist;
89 provider-related recommendations, controls and ads remain provider-controlled.
90 This component must not imply that only the curated lesson can ever be displayed.
91 The component installs official Android custom-widget callbacks with a presenter
92 that records its exact fullscreen route. User Back/close/disposal returns the
93 native custom view once; a repeated provider hide removes only that owned route,
94 not a different app page. This replaces the plugin's broad default `Navigator.pop`
95 behavior. Physical fullscreen/back-button behavior remains a device acceptance gate.
96
97 Current direct additions are `web`1.1.1, `webview_flutter`4.14.1 and
98 `webview_flutter_android`4.14.1; lockfile resolves platform interface2.15.1 and
99 WKWebView3.27.0. The core package requires Dart3.10+/Flutter3.38+, compatible with
100 the existing Flutter3.47.6/Dart3.13.5 toolchain. The resolved native implementations
101 raise lockfile minimums to Flutter3.47/Dart3.13; these are satisfied here.
102 iPhone/iPad delivery uses the PWA
103 iframe; a future native iOS build is not accepted by this research. Native desktop
104 shows an in-page unsupported message instead of launching another application.
105
106 ## Actual probe and test limits
107
108 [Sanitized real frame receipt](../audits/evidence/aparat-frame-probe-2026-10-09.json)
109 records a Playwright1.62.1/system Chromium probe. Only the reserved test wrapper
110 was intercepted. Aparat's document, scripts, stylesheet, metadata API, font and
111 poster/profile images used actual HTTPS through the normal proxy, with
112 `ignoreHTTPSErrors:false` and no TLS bypass. The inspected frame displayed a
113 paused Play control and `00:54`; it was not clicked.
114
115 Observed: one synthetic wrapper request plus seven real provider/CDN requests;
116 initial iframe request sent no wrapper Referer; provider child resources used
117 their own provider Referer. No media request, page/request error or initial cookie
118 was observed in this fresh browser profile. Playback was deliberately disabled and
119 media request types/extensions were guarded before fetching. Empty initial cookies
120 do not establish provider behavior after Play or for an existing browser profile.
121
122 The fixture widget tests verify hash/navigation validation, no remote frame before
123 consent, failure/retry, selection change, stale callback rejection, close/background
124 removal, fullscreen route isolation and desktop
125 fallback. They use a replaceable platform port and **do not prove playback**.
126 The first widget run found a short-viewport overflow; a scrollable body and visible
127 close control fixed it. Focused final suite:12/12 passed, zero skips. Platform source
128 analysis is separate from native Android compilation.
129
130 Actual media streaming, ads/cookies after Play, fullscreen, Android WebView/device
131 behavior, iPhone/iPad Safari/PWA, VPN-free reachability inside Iran, and the full
132 latest service terms remain **UNVERIFIED**. No live service or release was changed.