# Timeline markers

**URL:** <https://community.bitmovin.com/t/timeline-markers/3312>\
**Category:** Support\
**Tags:** bitmovin-player, bitmovin\
**Created:** [September 26, 2024, 10:09am UTC](https://community.bitmovin.com/t/timeline-markers/3312 "2024-09-26T10:09:19Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![cool.bambyk](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@cool.bambyk](https://community.bitmovin.com/u/cool.bambyk)\
**Post date:** [September 26, 2024, 10:09am UTC](https://community.bitmovin.com/t/timeline-markers/3312/1 "2024-09-26T10:09:19Z")

</div>

### Product

Player

### Question

How can i add timeline markers to BitmovinPlayer component that imports from ‘bitmovin-player-react’ package? Everything that i found in internet not working.

---

<div class="post-metadata">

**Author:** ![roland.kakonyi](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/roland.kakonyi/32/177_2.png) [@roland.kakonyi](https://community.bitmovin.com/u/roland.kakonyi)\
**Post date:** [September 30, 2024, 7:20am UTC](https://community.bitmovin.com/t/timeline-markers/3312/2 "2024-09-30T07:20:22Z")

</div>

Hi @cool.bambyk!

Unfortunately it is currently not supported to add timelime markers when using our React Native Player SDK.  
This is due to the fact that this feature is not available for the underlying Android and iOS Player SDKs at the moment.

We will take note of your request and stay tuned for updates!

---

<div class="post-metadata">

**Author:** ![cool.bambyk](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@cool.bambyk](https://community.bitmovin.com/u/cool.bambyk)\
**Post date:** [September 30, 2024, 7:28am UTC](https://community.bitmovin.com/t/timeline-markers/3312/4 "2024-09-30T07:28:30Z")

</div>

@roland.kakonyi I am using not react native but react. Does it change something?

---

<div class="post-metadata">

**Author:** ![roland.kakonyi](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/roland.kakonyi/32/177_2.png) [@roland.kakonyi](https://community.bitmovin.com/u/roland.kakonyi)\
**Post date:** [September 30, 2024, 7:53am UTC](https://community.bitmovin.com/t/timeline-markers/3312/5 "2024-09-30T07:53:04Z")

</div>

Sorry! My bad, I misread the package name.

Have you tried [this guide](https://developer.bitmovin.com/playback/docs/timeline-markers)?  
We also have [this sample](https://github.com/bitmovin/bitmovin-player-web-samples/blob/d1dcec70780d107e255eff9f42dcd8dada20c199/playerUi/timelineMarkers.html#L130).

---

<div class="post-metadata">

**Author:** ![cool.bambyk](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@cool.bambyk](https://community.bitmovin.com/u/cool.bambyk)\
**Post date:** [September 30, 2024, 8:12am UTC](https://community.bitmovin.com/t/timeline-markers/3312/6 "2024-09-30T08:12:22Z")

</div>

@roland.kakonyi yes i tried all of them. But none of sourceConfig, playerConfig or CustomUi in bitmovin-player-react have timeline markers, or something simular.

---

<div class="post-metadata">

**Author:** ![felix](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/felix/32/176_2.png) [@felix](https://community.bitmovin.com/u/felix)\
**Post date:** [September 30, 2024, 2:22pm UTC](https://community.bitmovin.com/t/timeline-markers/3312/7 "2024-09-30T14:22:20Z")

</div>

Hi @cool.bambyk!

You can define the UI config on the `PlayerConfig` ([PlayerConfig.ui](https://cdn.bitmovin.com/player/web/8/docs/interfaces/Core.PlayerConfig.html#ui)), and follow the guide already posted by Roland to define markers, like so:

```ts
const playerConfig: PlayerConfig = {
  key: "<key>",
  ui: {
    metadata: {
      markers: [
        {
          time: 24,
          title: 'Salto on the edge'
        },
        {
          time: 69,
          title: 'Interview - Marcus Gustafsson'
        }
      ],
    },
  }
};

```

Passing this config to the `BitmovinPlayer` component will forward the UI config accordingly. The interface for the UIConfig can be found here: [UIConfig | bitmovin-player-ui](https://cdn.bitmovin.com/player/ui/3/docs/interfaces/UIConfig.html)

---

<div class="post-metadata">

**Author:** ![cool.bambyk](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@cool.bambyk](https://community.bitmovin.com/u/cool.bambyk)\
**Post date:** [September 30, 2024, 3:00pm UTC](https://community.bitmovin.com/t/timeline-markers/3312/8 "2024-09-30T15:00:29Z")

</div>

@felix I already tried that. Here is my code of Player. Can you help me maybe?

```auto
"use client";

import { PlayerConfig, SourceConfig } from "bitmovin-player";
import { Fragment, Suspense } from "react";
import dynamic from "next/dynamic";
import "bitmovin-player-ui/dist/css/bitmovinplayer-ui.css";

const BitmovinPlayer = dynamic(
  () => import("bitmovin-player-react").then((mod) => mod.BitmovinPlayer),
  {
    ssr: false,
  }
);

export default function Player() {

  const defaultPlayerSource: SourceConfig = {
      dash: 'https://cdn.bitmovin.com/content/assets/sintel/sintel.mpd',
      hls: 'https://cdn.bitmovin.com/content/assets/sintel/hls/playlist.m3u8',
      poster: 'https://cdn.bitmovin.com/content/assets/sintel/poster.png'
  };

  const playerConfig: PlayerConfig = {
    key: "21010de8-3642-4549-a22a-369990669bb9",
    ui: {
      metadata: {
        markers: [
          {
            time: 24,
            title: 'Salto on the edge'
          },
          {
            time: 69,
            title: 'Interview - Marcus Gustafsson'
          }
        ],
      },
    },
    playback: {
      muted: true,
      autoplay: true,
    },
  };

  return (
    <Fragment>
      <h1>Bitmovin Player React Sample</h1>
      <div
        style={{
          position: "relative",
          maxWidth: "100%",
        }}
      >
        <Suspense fallback={<div>Loading...</div>}>
          <BitmovinPlayer
            source={defaultPlayerSource}
            config={playerConfig}
          />
        </Suspense>
      </div>
    </Fragment>
  );
}

```

---

<div class="post-metadata">

**Author:** ![cool.bambyk](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@cool.bambyk](https://community.bitmovin.com/u/cool.bambyk)\
**Post date:** [September 30, 2024, 3:13pm UTC](https://community.bitmovin.com/t/timeline-markers/3312/9 "2024-09-30T15:13:21Z")

</div>

@felix But there are no chapters on player’s timebar with this code.

---

<div class="post-metadata">

**Author:** ![felix](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/felix/32/176_2.png) [@felix](https://community.bitmovin.com/u/felix)\
**Post date:** [October 1, 2024, 9:44am UTC](https://community.bitmovin.com/t/timeline-markers/3312/10 "2024-10-01T09:44:31Z")

</div>

You’re right - sorry about that! It seems there was a bug in the component.

We have just published a new version `1.0.1` of the `bitmovin-player-react` package.

Please try again with that version and let me know how it goes 🙂

---

<div class="post-metadata">

**Author:** ![cool.bambyk](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@cool.bambyk](https://community.bitmovin.com/u/cool.bambyk)\
**Post date:** [October 1, 2024, 1:57pm UTC](https://community.bitmovin.com/t/timeline-markers/3312/11 "2024-10-01T13:57:13Z")

</div>

@felix Wow, thanks now it works 😀  
Can you also check playerConfig advertising there or it’s better to create new ticket? I think adBreaks should be AdBreakConfig type, when we want to add position and id for example. And for now advertising not working in playerConfig for me.

---

<div class="post-metadata">

**Author:** ![felix](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/felix/32/176_2.png) [@felix](https://community.bitmovin.com/u/felix)\
**Post date:** [October 1, 2024, 2:26pm UTC](https://community.bitmovin.com/t/timeline-markers/3312/12 "2024-10-01T14:26:24Z")

</div>

Glad to hear!

I have created an internal ticket for the advertising type 👍

In the meantime, you can cast it to the proper type, e.g.

```ts
advertising: {
  adBreaks: [
    {
      tag: adTag,
      position: 'pre',
    } as AdBreakConfig,
  ],
}

```

---

<div class="post-metadata">

**Author:** ![cool.bambyk](https://avatars.discourse-cdn.com/v4/letter/c/a4c791/32.png) [@cool.bambyk](https://community.bitmovin.com/u/cool.bambyk)\
**Post date:** [October 4, 2024, 7:22am UTC](https://community.bitmovin.com/t/timeline-markers/3312/13 "2024-10-04T07:22:13Z")

</div>

@felix Hello, sorry, can i already use advertising with react package? code for advertising not working at all.

In playerConfig:

```auto
const playerConfig: PlayerConfig = {
    key: "my-key",
    ui: {
      metadata: {
        markers: [
          {
            time: 30,
            title: "Warm up",
          },
          {
            time: 45,
            title: "Worm out",
          },
          {
            time: 121,
            title: "Rest",
          },
          {
            time: 223,
            title: "Cool down",
          },
        ],
      },
    },
    playback: {
      muted: false,
      autoplay: false,
    },
    advertising: {
      adBreaks: [
        {
          tag:{
            url: "",
            type: "vast",
          },
          position: "pre"
        } as AdTagConfig
      ]
    }
  };

```

---

<div class="post-metadata">

**Author:** ![felix](https://sea1.discourse-cdn.com/flex015/user_avatar/community.bitmovin.com/felix/32/176_2.png) [@felix](https://community.bitmovin.com/u/felix)\
**Post date:** [October 4, 2024, 8:11am UTC](https://community.bitmovin.com/t/timeline-markers/3312/14 "2024-10-04T08:11:10Z")

</div>

Yes, ads are supported. You can follow the normal Ads setup guide: [Setting up Ads with the Web Player](https://developer.bitmovin.com/playback/docs/setting-up-ads-with-the-web-player)

Did you specify a URL for the VAST tag? I am able to see the ad getting played as expected with your advertising config and an IMA sample tag:

```ts
  advertising: {
    adBreaks: [
      {
        tag: {
          url: 'https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/single_ad_samples&sz=640x480&cust_params=sample_ct%3Dlinear&ciu_szs=300x250%2C728x90&gdfp_req=1&output=vast&unviewed_position_start=1&env=vp&impl=s&correlator=',
          type: 'vast',
        },
        position: 'pre',
      } as AdTagConfig,
    ],
  },

```
