Thursday, November 7, 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 carry casting capabilities to extra apps and units. We’ve come a good distance. Now, customers can solid to many new units, like TVs, audio system, sensible shows, and even the newest 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 system classes

Android makes transferring media between numerous units– together with telephones to TVs, tablets, audio system, and sensible shows–straightforward with Output Switcher. Output Switcher is well 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, system 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
<software>
    ...
    <receiver
         android:title="androidx.mediarouter.media.MediaTransferReceiver"
         android:exported="true">
    </receiver>
    ...
</software>
    • 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 mandatory 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 system.
                // 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: Deliver your Android telephone near the docked Pixel Pill to switch media

It would quickly be attainable to solid to units close by in a complete new approach when you’ve got 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’ll 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)

Brief-form content material is extraordinarily widespread and rising in use. Google Forged could make it straightforward for customers to look at their favourite short-form content material on TVs or different cast-enabled units. Now, you’ll be able to simply lengthen Google Forged help into your apps. These are the rules we put collectively to supply a fantastic 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’ll solid media to a TV simply by seeing the Forged icon.

solid with autoplay

Customers will even 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 system just isn’t related 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 now have 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 steering on why they don’t see a particular system. As well as, we have up to date when system discovery begins. Extra data could be discovered within the Google Forged Developer Information.

Shaka Participant

For any Net Receiver purposes streaming HLS content material, we advocate trying into migrating to Shaka Participant for playback. The present participant (MPL) will now not undertake characteristic updates. Because of this, the Net Receiver SDK has elevated help for HLS playback utilizing Shaka Participant on the system targets and has launched an opt-in flag to allow it. Check 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 software:

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’ve been constantly working with numerous OEMs to carry Chromecast built-in to new units. Final yr, we launched Chromecast built-in to new audio system, whereas additionally introducing the receiver help on docked Pixel Tablets.

As at all times, 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 are actually over 220 million month-to-month energetic 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 collection.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles