2.9 C
London
Sunday, January 14, 2024

What’s new with Google Forged?



Posted by Meher Vurimi, Product Supervisor

Since we launched Google Forged in 2013, we have been working to convey casting capabilities to extra apps and units. We have now come a good distance. Now, customers can solid to many new units, like TVs, audio system, sensible shows, and even the most recent Pixel Pill. We’re very excited to launch new options that make it extra seamless to solid on Android.

Output Switcher

Moving image of output switcher showing various device categories

Determine 1: Output Switcher exhibiting numerous machine classes

Android makes transferring media between numerous units– together with telephones to TVs, tablets, audio system, and sensible shows–simple with Output Switcher. Output Switcher is definitely accessible from the Android System UI and goals to permit cross-device switch and management in a single place for various technical protocols. With Output Switcher 2.0 on Android U, you can too see improved quantity management, machine classes, and help for units with customized protocols.

Extra data could be discovered within the Google Forged developer information and Media router.

    • Allow Output Switcher in AndroidManifest.xml
<utility>
    ...
    <receiver
         android:identify="androidx.mediarouter.media.MediaTransferReceiver"
         android:exported="true">
    </receiver>
    ...
</utility>
    • Replace SessionManagerListener for background casting
class MyService : Service() {
    personal var castContext: CastContext? = null
    protected enjoyable onCreate() {
        castContext = CastContext.getSharedInstance(this)
        castContext
            .getSessionManager()
            .addSessionManagerListener(sessionManagerListener, 
CastSession::class.java)
    }

    protected enjoyable onDestroy() {
        if (castContext != null) {
            castContext
                .getSessionManager()
                .removeSessionManagerListener(sessionManagerListener, 
CastSession::class.java)
        }
    }
}
    • Help Distant-to-Native playback
class MySessionTransferCallback : SessionTransferCallback() {
        enjoyable onTransferring(@SessionTransferCallback.TransferType transferType: 
Int) {
            // Carry out obligatory steps previous to onTransferred
        }

        enjoyable onTransferred(@SessionTransferCallback.TransferType transferType: 
Int,
                          sessionState: SessionState?) {
            if (transferType == SessionTransferCallback.TRANSFER_TYPE_FROM_REMOTE_TO_LOCAL) {
                // Distant stream is transferred to the native machine.
                // Retrieve data from the SessionState to proceed playback on the native participant.
            }
        }

        enjoyable onTransferFailed(@SessionTransferCallback.TransferType transferType: 
Int,
                             @SessionTransferCallback.TransferFailedReason 
transferFailedReason: Int) {
            // Deal with switch failure.
        }
    }

Forged to units close by

Moving image showing bringing an Android phone close to the docked Pixel Tablet to transfer media

Determine 2: Convey your Android telephone near the docked Pixel Pill to switch media

It would quickly be doable to solid to units close by in a complete new means when you’ve a Pixel Professional telephone and a docked Pixel Pill. Customers can switch ongoing music from their Pixel Professional telephone to a docked Pixel Pill simply by bringing the telephone nearer to the docked pill. Equally, they will switch the music to their telephone from a docked Pixel Pill simply by holding the telephone nearer to the pill. This characteristic wants Output Switcher integration as a prerequisite.

Forged from short-form video apps

Moving image showing enabling and disabling autoplay for short-form content

Determine 3: Enabling and disabling autoplay for short-form content material (autoplay is enabled by default)

Quick-form content material is extraordinarily in style and rising in use. Google Forged could make it simple for customers to observe their favourite short-form content material on TVs or different cast-enabled units. Now, you possibly can simply lengthen Google Forged help into your apps. These are the rules we put collectively to supply an ideal person expertise to your customers.

solid out of your telephone

Be sure that the Google Forged icon is prominently displayed on each display screen with playable content material on the highest proper nook. Customers robotically perceive they will solid media to a TV simply by seeing the Forged icon.

solid with autoplay

Customers may also have an choice to disable autoplay to solid a particular video. When autoplay is enabled, playback robotically transitions to the subsequent video with none person intervention.

Persistent Forged icon

Moving image showing cast icon and error message for users to troubleshoot if no devices  are found

Determine 4: Forged icon is proven even when the sender machine shouldn’t be linked to Wi-Fi, showcasing an error message for customers to troubleshoot if no units are discovered.

We have heard suggestions that when customers do not see the solid icon, they assume their Chromecast built-in units have not been found. To enhance person expertise and discovery, we have now launched the “Persistent solid icon”. With this help, customers will see the solid icon at any time when they want and may obtain higher assist and steerage on why they don’t see a particular machine. As well as, we have up to date when machine discovery begins. Extra data could be discovered within the Google Forged Developer Information.

Shaka Participant

For any Net Receiver functions streaming HLS content material, we suggest wanting into migrating to Shaka Participant for playback. The present participant (MPL) will not undertake characteristic updates. Consequently, the Net Receiver SDK has elevated help for HLS playback utilizing Shaka Participant on the machine targets and has launched an opt-in flag to allow it. Discuss with the Shaka Participant migration information hosted on the DevSite for extra data and implementation particulars.

To opt-in to make use of Shaka Participant for HLS content material use the next snippet in your Google Forged Receiver utility:

const context = solid.framework.CastReceiverContext.getInstance();

const castReceiverOptions = new solid.framework.CastReceiverOptions();
castReceiverOptions.useShakaForHls = true;

context.begin(castReceiverOptions);

Forged to new units

Moving image showing the experience of casting to an LG TV as a first time user

Determine 5: Casting to LG TVs for a primary time person

We have now been repeatedly working with numerous OEMs to convey Chromecast built-in to new units. Final 12 months, we launched Chromecast built-in to new audio system, whereas additionally introducing the receiver help on docked Pixel Tablets.

As all the time, Google TVs include Chromecast built-in, together with the brand new Hisense ULED and ULED X Sequence, newest TCL Q Class fashions, and new TCL QM7 line. Actually, there at the moment are over 220 million month-to-month lively Google TV and different Android TV OS units, and we’re simply getting began. Extra units are launching with Chromecast built-in, just like the 2024 LG TV sequence.

Latest news
Related news

LEAVE A REPLY

Please enter your comment!
Please enter your name here