تحسين عرض الوسائط وتشغيلها: الخيارات الأساسية والأفضل والأفضل من ذلك
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يوضّح هذا الدليل التقدّم الأمثل لتطبيق يركّز على تشغيل الوسائط من
من البداية إلى الأفضل في فئتها. إنها مصممة لمساعدتك على التفكير في
لتوسيع نطاق تطبيقك بمرور الوقت، والميزات التي يجب تنفيذها. على الرغم من اختلاف كل
تطبيق لاستهلاك الوسائط، ننصحك باتّباع هذه الاقتراحات للحصول على
تجربة فريدة من نوعها.
يوفّر تطبيق أساسي لعرض الوسائط وتشغيلها للمستخدمين
المستخدم، والتي قد تشمل القيام بما يلي:
يستفيد تطبيق عرض وتشغيل الوسائط الأفضل من الأجهزة المميّزة
وميزات المنصة المعدّلة، وذلك لتنفيذ ما يلي:
يمنح تطبيق عرض وتشغيل الوسائط الأفضل في فئته المستخدمين إمكانية الوصول إلى ميزات متقدمة
تُميّز التطبيق، مثل:
يخضع كل من المحتوى وعيّنات التعليمات البرمجية في هذه الصفحة للتراخيص الموضحّة في ترخيص استخدام المحتوى. إنّ Java وOpenJDK هما علامتان تجاريتان مسجَّلتان لشركة Oracle و/أو الشركات التابعة لها.
تاريخ التعديل الأخير: 2024-10-15 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-10-15 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Take your media display and playback to the next level — basic, better, and best\n\nThis guide charts the optimal progression of a media playback-focused app from a\nlikely starting place to best-in-class. It's designed to help you think about\nscaling your app over time, and what features to implement when. While every\nmedia consumption app is different, consider these recommendations to achieve a\nbest-in-class experience.\n\nBasic media display and playback\n--------------------------------\n\nA basic media display and playback app provides users with a foundational\nexperience, which may include doing the following:\n\n- Offer an in-app media player using with playback controls, using [formats](/guide/topics/media/media-formats) that are supported across the Android ecosystem, ideally using [Media3s](/guide/topics/media/media3) [ExoPlayer](/guide/topics/media/exoplayer).\n- Use the latest version of the [Jetpack Media3](/guide/topics/media/media3) library.\n- Use optimized server-generated thumbnails as well as [best practices for locally-generated ones](/social-and-messaging/guides/media-thumbnails), and cache them locally.\n- Invest in [accessibility](/guide/topics/ui/accessibility/principles#media-content).\n\nBetter media display and playback\n---------------------------------\n\nA better media display and playback app leverages premium device hardware and\nupdated platform features, to:\n\n- Implement a [`MediaSession`](/guide/topics/media/media3/getting-started/mediasession) --- made easy with [Media3s](/guide/topics/media/media3) [ExoPlayer](/guide/topics/media/exoplayer) --- to enable playback integration across different apps, system components, and devices.\n- Use [best practices for sharing video](/media/optimize/sharing), [transcoding](/media/media3/transformer/transformations#transcode) if necessary.\n- Support [sharing multiple pieces of content](/training/sharing/send#share-multiple-content) at the same time.\n- Enable [picture-in-picture](/develop/ui/views/picture-in-picture) for video and audio playback so users can multitask.\n- Enable support for [UltraHDR](/media/grow/ultra-hdr-display) images.\n- Play [HDR](/media/grow/hdr-playback) video.\n- Support playback to [Cast](https://developers.google.com/cast/docs/developers) devices.\n- Add an [app widget](/develop/ui/views/appwidgets/overview) so users can get see what friends are up to and search from their home screen.\n\nBest media display and playback\n-------------------------------\n\nA best-in-class media display and playback app gives users access to advanced\nfeatures that really make the app stand out, such as:\n\n- Check to see if images contain a [gain-map](/guide/topics/media/platform/hdr-image-format#gain_map-generation), and strategically use [`setColorMode()`](/reference/android/view/Window#setColorMode(int)) to [`ActivityInfo.COLOR_MODE_HDR`](/reference/android/content/pm/ActivityInfo#COLOR_MODE_HDR) to optimize for content display and battery life.\n- Optimize for foldables by supporting the [`HALF_OPENED` state](/develop/ui/compose/layouts/adaptive/foldables/learn-about-foldables#foldable_postures)\n- Ensure [design](/design/ui) consistency with the platform.\n- Implement [Cast Connect](https://developers.google.com/cast/docs/android_tv_receiver) so users can cast to your [Android TV](/training/tv) app.\n- Use [Performance Class](/topic/performance/performance-class) to adapt your user experience to match device capabilities."]]