PxMediaPx graphics can be viewed in many different settings: Workbench, the browser, or exported to a PDF. By specifying a PxMedia type, you can specify what kind of environment you intend your graphic to be viewed in. Specifying the media has several effects:
Px graphic with a certain media type, Workbench may create it with a different starting configuration tailored toward the most common uses of that media type.It is important to note that, depending on the profile, the media type doesn’t have to match exactly. For instance, Workbench-media graphics may be supported using HxPx, and vice-versa.
There are two ways a media type may be specified.
The first and most common way is to specify it when creating a new view on a component using the New View command. The New View command creates an instance of baja:PxView as a property of the component you’re creating the view on, and the media type is a property of that PxView. When accessing the view on that component, this is the media type that will be applied.
The second, less common way, is to specify the media type directly inside the .px file itself. This media type is only applied when the user navigates directly to that .px file. If the user accesses the graphic as a view on a component, then the component’s media type will be used as described above.
workbench:WbPxMediaA graphic with WbPxMedia is intended to be used in Workbench or other bajaui-based application like Web Launcher. Basically all bajaui Widgets are supported with WbPxMedia.
A graphic with WbPxMedia will also display using HxPxMedia and work fine in most cases, but if it contains a widget that is incompatible with Hx you may encounter errors or missing widgets.
hx:HxPxMediaHxPxMedia marks your graphic as targeted for use in the browser using the HxPx framework. Most widgets provided out-of-the-box with Niagara are supported (those in the bajaui and kitPx palettes), but other widgets may not have Hx support.
uxBuilder:UxMediaNew in Niagara 4.10, UxMedia pages render 100% in the browser using bajaux-based widgets and APIs. For more information, see the deep dive into UxMedia.
report:ReportPxMediaPx pages with ReportPxMedia are intended to be used in report pages that render to PDF. They render as expected using bajaui in Workbench and HxPx in the browser.
bajaui:PxMedia is public API, so you may have more media types available than just these options.