• Из-за обновления GTA 5 (был добавлен новый патч) может временно не работать вход в RAGE Multiplayer.

    Ошибка: Ваша версия Grand Theft Auto V не поддерживается RAGE Multiplayer.
    ERROR: Your game version is not supported by RAGE Multiplayer.

    Данная ошибка говорит о том, что GTA V обновилась до новой версии (GTA Online тоже). Вам необходимо обновить саму игру в главном меню вашего приложения (Steam / Epic Games / Rockstar Games).
    Если после этого RAGE:MP все равно не работает - вам нужно дождаться выхода патча для самого мультиплеера (обычно это занимает от нескольких часов до нескольких дней).

    Новости и апдейты Rockstar Games - https://www.rockstargames.com/newswire/
    Статус всех служб для Rockstar Games Launcher и поддерживаемых игр: https://support.rockstargames.com/ru/servicestatus


    Grand Theft Auto 5 (+ GTA Online) последний раз были обновлены:

Проблема Отображение видео через

Evolutionnn

Новый участник
3 Окт 2024
23
0
38
Всем привет. Попытался сделать на html + css + js систему выбора банд где у тебя на экране будет показываться видео с непосредственно самой бандой, но проблема в том, что при просмотре в браузере все работает нормально, но в самой игре видео попросту не отображается почему-то

HTML:
<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="css/style.css">
    <script src="js/script.js"></script>
    <style>

    </style>
</head>
<body>

    <div class="header-button">
        <button id="leftButton" onclick="nextFraction('left')"></button>
        <button id="rightButton" onclick="nextFraction('right')"></button>
        <button id="joinButton" onclick="joinFraction()">войти</button>
    </div>


<div class="video-background">
    <video id="myVideo" autoplay muted loop playsinline>
        <source src="video/video.mp4" type="video/mp4">
    </video>
</div>

<div class="volume-control" aria-label="Контроль громкости видео">
    <button id="volumeButton" class="volume-button" type="button" aria-label="Звук">
        <svg id="volumeIcon" class="volume-icon" viewBox="0 0 24 24" aria-hidden="true">
            <path class="speaker-body" d="M3 10v4h4l5 4V6L7 10H3z"></path>
            <path class="wave wave-low" d="M14.5 9.5a4 4 0 010 5"></path>
            <path class="wave wave-high" d="M16.5 7a7 7 0 010 10"></path>
            <line class="mute-line mute-line-1" x1="15" y1="8" x2="21" y2="16"></line>
            <line class="mute-line mute-line-2" x1="21" y1="8" x2="15" y2="16"></line>
        </svg>
    </button>
    <input
        id="volumeSlider"
        class="volume-slider"
        type="range"
        min="0"
        max="1"
        step="0.01"
        value="0.5"
        aria-label="Громкость видео"
    >
</div>

<div class="card-container">
    <div class="image-placeholder" id="gangImage"></div>

    <div class="header">
        <div class="back-arrow-container">
            <span class="back-arrow-special"></span>
        </div>
        <span class="header-title" id="gangHeaderTitle"></span>
    </div>

    <div class="main-info-area">
        <div class="content">
            <div class="label">name</div>
            <div class="common-text-style" id="gangName"></div>

            <div class="label">description</div>
            <div class="common-text-style description-text" id="gangDescription"></div>
        </div>
    </div>
</div>

</body>
</html>

CSS:
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: max(100%, 100vw);
    height: 100%;
    z-index: -1;
    overflow: hidden;
   
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: none;

    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-position: center bottom;
}

.video-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999; /
    display: flex;
    gap: 10px;
}

JavaScript:
document.addEventListener("DOMContentLoaded", () => {
    const video = document.getElementById("myVideo");
    const volumeSlider = document.getElementById("volumeSlider");
    const volumeIcon = document.getElementById("volumeIcon");
    const volumeButton = document.getElementById("volumeButton");
    const gangImage = document.getElementById("gangImage");
    const gangHeaderTitle = document.getElementById("gangHeaderTitle");
    const gangName = document.getElementById("gangName");
    const gangDescription = document.getElementById("gangDescription");

    if (!video || !volumeSlider || !volumeIcon || !gangImage || !gangHeaderTitle || !gangName || !gangDescription) {
        return;
    }

    const gangs = [
        {
            id: "apb",
            title: "E/S Athens Park Bloods",
            name: "E/S Athens Park Bloods",
            description: `Part of NWA, APB is a large and highly
                reputable Blood gang located in the
                Athens/Willowbrook area on the East
                side, main cliques are 124th, 127th, and
                132nd. Formerly known as the Athens
                Park Boys, APB is one of the original five
                sets in the city that banded together to
                form the Bloods in 1972. As early and
                long-standing rivalries with Crip gangs
                like 118ECBC and others influenced them
                and other sets that feuded with Crips to
                adopt their own color and name. APB for
                the longest has been allied with MGB to
                form Athens Miller Gangster Bloods
                (AMGB), though they’ve also recently
                cliqued up with CPP/WSP to form NWA
                (Nellaz West Athens). Despite being a
                east side Blood gang, the younger
                generation of AMGB is loosely affiliated
                with SMG politics, as the majority of Crip
                gangs they beef with claim BC/NHC/2X,
                and their relationship with most GC/HCG
                sets are neutral due to common
                enemies. Their main rivals presently are
                116KCG, 118ECBC, and 120RAC. Though
                they have lesser beefs with BHWB, PJWC,
                CPCC, MPCC, TPCC, OSCC, FHCC, SGC,
                PBC, VAC, and most other Avenue Crip,
                Blocc Crip, Neighborhood Crip, and
                Compton Crip gangs.

                <br>Rappers: RJ, Ceddy Mack`,
            image: "img/apb.png",
            video: "video/apb.mp4",
            joinUrl: "#"
        },
        {
            id: "40rac",
            title: "W/S Rollin' 40's Avenue Crips",
            name: "W/S Rollin' 40's Avenue Crips",
            description: `Part of the Rollin' 40's (RFC), are also known as Vernon
            Avenue Crips or A-Town. The Avenue side of the Rollin' 40's
            (RFC) is the westernmost side of their hood that stretches
            from Crenshaw Boulevard to Arlington Avenue. Are located
            in the Leimert Park district, which is one of the few
            predominately Black/Belizean American/African American
            neighborhoods left in Los Angeles County; and also the
            area that non-affiliate LA rapper Dom Kennedy grew up in.
            Historically represented by the Los Angeles Angels and
            Arizona Wildcats logos with cerulean (teal) rags and red
            Angels logos; the Avenues clique is understood to be the
            more preppy and "flyer" side of their hood (more expensive
            housing market prices, more Nike Tech suits, and less Pro
            Club t-shirt and wifebeaters fits on members as seen the
            further east you go). Leimert Park itself also has a more
            positive and upscale reputation than the rest of South
            Central due to being the epicenter of Black Los Angeles
            culturally and hosting popular annual citywide events such
            as the Juneteenth Festival and MLK Day Parade that are
            attended by thousands near 43rd/King and Crenshaw
            Boulevard. Their main beefs historically are with BPS across
            Crenshaw Boulevard in a gang war that's gone on for over
            five decades and resulted in numerous incidents and
            deaths. And is also one that makes local social media news
            headlines annually when gang fights breakout between
            youths from both sides (and their allies) on Crenshaw
            Boulevard during annual MLK Day Parade. The Avenues
            clique also differs from the other sides (Western, Parcside,
            and Darcside) in that they historically push NHC the least
            out of all five sides, and instead primarily claim and fall
            under Avenue Crip (AC) along with RAC. And most
            members (similar to 104HTHC being a Hustler Crip/NHC-
            hybrid) claim either AC solely (mainly where the younger
            generation is concerned) or both. Though despite
            differences in lineage, both the Avenues (R40AC) and the
            other four sides (R40NHC) are mostly considered the
            synonymous under RFC/OSE/Glove Gang. The Avenues
            clique as a predominately AC side was further solidified
            after the now cease fired war between former allies the
            Rollin' 40's and Rollin' 60's NHC broke out between the two
            gangs in 2013, as Rollin' 40's AC sits directly on the<
            borderline of the two major hoods on 48th and Crenshaw
            Boulevard. And due to the Rollin 60's ties with the Rollin'
            100's (600), the 40's have also had sporadic issues and is
            distant at best with the Rollin' 100's BC gangs. Their>br>
            increased identification with AC politics post-2010s has
            further dragged them into formerly dormant or non-existent
            beefs via minor incidents in recent years with gangs on the
            west side that skew heavily anti-AC such as DLGB (who a
            decade ago were loosely allied with RFC under "Figarollin")
            and Shotgun Crips (SGC) in Gardena. They mainly beef with
            Rollin' 20's NHB, CSB, JSB, VNGB, IFGB, DLGB, MOB, SGC,
            51TGC, 73GC, 83GC, 99MC, and all other Blood, Brim, Piru,
            Hoover, and Gangster Crip gangs.

            <br>Rappers: Ablue, Dody6, 8Beezy, NfantJahk (R.I.P), CBK4, Txny4, FAcey5`,
            image: "img/40rac.png",
            video: "video/40rac.mp4",
            joinUrl: "#"
        },
    ];

    const initialGangId = "apb";
    const initialGangIndex = gangs.findIndex((gang) => gang.id === initialGangId);
    let currentGangIndex = initialGangIndex >= 0 ? initialGangIndex : 0;

    const ensurePlayback = () => {
        const playPromise = video.play();
        if (playPromise && typeof playPromise.catch === "function") {
            playPromise.catch(() => {
            });
        }
    };

Grand Theft Auto V Screenshot 2026.04.23 - 04.00.57.81.png

Снимок экрана 2026-04-23 040309.png

Я посмотрел все темы которые нашел связанные с данной темой на этом форуме, но к сожалению, ни одно из них не смогло мне помочь. Кто-то кидал ссылки на статьи какие-то вне форума, но они уже не работают. На других сайтах тоже ничего дельного не нашел ( может я просто плохой искатель :\ )
 

Jerry (ChatGPT)

AI-powered language model
VIP
helper
17 Окт 2023
2,970
293
100
Привет! Часто в играх видеотеги не работают из-за ограничений движка или безопасности — например, видео должно быть в нужном формате, пути к файлам правильные и доступные, а также иногда нужно включать специальные флаги или использовать API движка для показа видео. Проверь, что:

1. Видео действительно загружается (путь к файлу корректен и доступен в игре).
2. Формат видео поддерживается движком.
3. В настройках игры нет отключения воспроизведения видео через html-тэги.
4. Возможно, нужно использовать встроенные средства движка для видео вместо обычного <video>.

Если есть возможность — попробуй логировать ошибки, которые возникают при загрузке видео в игре. Это поможет понять, в чем проблема.
 

Evolutionnn

Новый участник
3 Окт 2024
23
0
38
Цеф не кушает mp4 файлы как мне кажется. Конвертируй mp4 в webm и всё должно будет завестись
не-а
Сначала необходимо преобразовать видео в формат '.webm'.
1776978534515.png

Да бро я так и сделал через сайт, мб надо еще что-то прописать?
 

PercyBerkeley

Участник портала
BackEnd developer
16 Ноя 2024
235
23
77
Дважды проверьте правильность указания пути к видео в теге. Путь в атрибуте src должен быть относительным к вашему HTML-файлу. Если ваш HTML-файл находится в папке gangchoice, он будет выглядеть так:


Код:
<video autoplay loop muted>
  <source src="video/banda1.webm" type="video/webm">
</video>


Replace "band 1.webm" with the name of your video file; from what I see in your screenshot, it's 'apb.webm'.
 

Evolutionnn

Новый участник
3 Окт 2024
23
0
38
Дважды проверьте правильность указания пути к видео в теге. Путь в атрибуте src должен быть относительным к вашему HTML-файлу. Если ваш HTML-файл находится в папке gangchoice, он будет выглядеть так:


Код:
<video autoplay loop muted>
  <source src="video/banda1.webm" type="video/webm">
</video>


Replace "band 1.webm" with the name of your video file; from what I see in your screenshot, it's 'apb.webm'.
1776985606934.png

HTML:
<!DOCTYPE html>
<html lang="ru">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">
    <link rel="stylesheet" href="css/style.css">
    <script src="js/script.js"></script>
    <style>

    </style>
</head>
<body>

    <div class="header-button">
        <button id="leftButton" onclick="nextFraction('left')"></button>
        <button id="rightButton" onclick="nextFraction('right')"></button>
        <button id="joinButton" onclick="joinFraction()">войти</button>
    </div>


<div class="video-background">
    <video id="myVideo" autoplay muted loop playsinline>
        <source src="video/apb.webm" type="video/webm">
    </video>
</div>

<div class="volume-control" aria-label="Контроль громкости видео">
    <button id="volumeButton" class="volume-button" type="button" aria-label="Звук">
        <svg id="volumeIcon" class="volume-icon" viewBox="0 0 24 24" aria-hidden="true">
            <path class="speaker-body" d="M3 10v4h4l5 4V6L7 10H3z"></path>
            <path class="wave wave-low" d="M14.5 9.5a4 4 0 010 5"></path>
            <path class="wave wave-high" d="M16.5 7a7 7 0 010 10"></path>
            <line class="mute-line mute-line-1" x1="15" y1="8" x2="21" y2="16"></line>
            <line class="mute-line mute-line-2" x1="21" y1="8" x2="15" y2="16"></line>
        </svg>
    </button>
    <input
        id="volumeSlider"
        class="volume-slider"
        type="range"
        min="0"
        max="1"
        step="0.01"
        value="0.5"
        aria-label="Громкость видео"
    >
</div>

<div class="card-container">
    <div class="image-placeholder" id="gangImage"></div>

    <div class="header">
        <div class="back-arrow-container">
            <span class="back-arrow-special"></span>
        </div>
        <span class="header-title" id="gangHeaderTitle"></span>
    </div>

    <div class="main-info-area">
        <div class="content">
            <div class="label">name</div>
            <div class="common-text-style" id="gangName"></div>

            <div class="label">description</div>
            <div class="common-text-style description-text" id="gangDescription"></div>
        </div>
    </div>
</div>

</body>
</html>

JavaScript:
    function setGangsInfo(gangsParse) {
        const gangsInfo = typeof gangsParse === "string" ? JSON.parse(gangsParse) : gangsParse;
        const gangsList = Array.isArray(gangsInfo) ? gangsInfo : Object.values(gangsInfo || {});

        gangs = gangsList.map((gang, index) => {
            const id = String(gang.id ?? index);
            const name = String(gang.name ?? gang.title ?? id);

            return {
                id,
                title: name,
                name,
                description: String(gang.description ?? ""),
                image: String(gang.image ?? `img/${id}.png`),
                video: String(gang.video ?? `video/${id}.webm`)
            };
        });

        currentGangIndex = 0;
        renderGang(currentGangIndex);
    }

по идее все верно, разве нет? По крайней мере, мои скриншоты и описание успешно загружаются через js скрипт
 

PercyBerkeley

Участник портала
BackEnd developer
16 Ноя 2024
235
23
77
The question is: does your renderGang function dynamically update the video's source? Because if it doesn't, it will always display apb.webm and not the current band's video.



In this file, you still have it set as .mp4

JavaScript:
document.addEventListener("DOMContentLoaded", () => {
    const video = document.getElementById("myVideo");
    const volumeSlider = document.getElementById("volumeSlider");
    const volumeIcon = document.getElementById("volumeIcon");
    const volumeButton = document.getElementById("volumeButton");
    const gangImage = document.getElementById("gangImage");
    const gangHeaderTitle = document.getElementById("gangHeaderTitle");
    const gangName = document.getElementById("gangName");
    const gangDescription = document.getElementById("gangDescription");

    if (!video || !volumeSlider || !volumeIcon || !gangImage || !gangHeaderTitle || !gangName || !gangDescription) {
        return;
    }

    const gangs = [
        {
            id: "apb",
            title: "E/S Athens Park Bloods",
            name: "E/S Athens Park Bloods",
            description: `Part of NWA, APB is a large and highly
                reputable Blood gang located in the
                Athens/Willowbrook area on the East
                side, main cliques are 124th, 127th, and
                132nd. Formerly known as the Athens
                Park Boys, APB is one of the original five
                sets in the city that banded together to
                form the Bloods in 1972. As early and
                long-standing rivalries with Crip gangs
                like 118ECBC and others influenced them
                and other sets that feuded with Crips to
                adopt their own color and name. APB for
                the longest has been allied with MGB to
                form Athens Miller Gangster Bloods
                (AMGB), though they’ve also recently
                cliqued up with CPP/WSP to form NWA
                (Nellaz West Athens). Despite being a
                east side Blood gang, the younger
                generation of AMGB is loosely affiliated
                with SMG politics, as the majority of Crip
                gangs they beef with claim BC/NHC/2X,
                and their relationship with most GC/HCG
                sets are neutral due to common
                enemies. Their main rivals presently are
                116KCG, 118ECBC, and 120RAC. Though
                they have lesser beefs with BHWB, PJWC,
                CPCC, MPCC, TPCC, OSCC, FHCC, SGC,
                PBC, VAC, and most other Avenue Crip,
                Blocc Crip, Neighborhood Crip, and
                Compton Crip gangs.

                <br>Rappers: RJ, Ceddy Mack`,
            image: "img/apb.png",
            video: "video/apb.mp4",
            joinUrl: "#"
        },
        {
            id: "40rac",
            title: "W/S Rollin' 40's Avenue Crips",
            name: "W/S Rollin' 40's Avenue Crips",
            description: `Part of the Rollin' 40's (RFC), are also known as Vernon
            Avenue Crips or A-Town. The Avenue side of the Rollin' 40's
            (RFC) is the westernmost side of their hood that stretches
            from Crenshaw Boulevard to Arlington Avenue. Are located
            in the Leimert Park district, which is one of the few
            predominately Black/Belizean American/African American
            neighborhoods left in Los Angeles County; and also the
            area that non-affiliate LA rapper Dom Kennedy grew up in.
            Historically represented by the Los Angeles Angels and
            Arizona Wildcats logos with cerulean (teal) rags and red
            Angels logos; the Avenues clique is understood to be the
            more preppy and "flyer" side of their hood (more expensive
            housing market prices, more Nike Tech suits, and less Pro
            Club t-shirt and wifebeaters fits on members as seen the
            further east you go). Leimert Park itself also has a more
            positive and upscale reputation than the rest of South
            Central due to being the epicenter of Black Los Angeles
            culturally and hosting popular annual citywide events such
            as the Juneteenth Festival and MLK Day Parade that are
            attended by thousands near 43rd/King and Crenshaw
            Boulevard. Their main beefs historically are with BPS across
            Crenshaw Boulevard in a gang war that's gone on for over
            five decades and resulted in numerous incidents and
            deaths. And is also one that makes local social media news
            headlines annually when gang fights breakout between
            youths from both sides (and their allies) on Crenshaw
            Boulevard during annual MLK Day Parade. The Avenues
            clique also differs from the other sides (Western, Parcside,
            and Darcside) in that they historically push NHC the least
            out of all five sides, and instead primarily claim and fall
            under Avenue Crip (AC) along with RAC. And most
            members (similar to 104HTHC being a Hustler Crip/NHC-
            hybrid) claim either AC solely (mainly where the younger
            generation is concerned) or both. Though despite
            differences in lineage, both the Avenues (R40AC) and the
            other four sides (R40NHC) are mostly considered the
            synonymous under RFC/OSE/Glove Gang. The Avenues
            clique as a predominately AC side was further solidified
            after the now cease fired war between former allies the
            Rollin' 40's and Rollin' 60's NHC broke out between the two
            gangs in 2013, as Rollin' 40's AC sits directly on the<
            borderline of the two major hoods on 48th and Crenshaw
            Boulevard. And due to the Rollin 60's ties with the Rollin'
            100's (600), the 40's have also had sporadic issues and is
            distant at best with the Rollin' 100's BC gangs. Their>br>
            increased identification with AC politics post-2010s has
            further dragged them into formerly dormant or non-existent
            beefs via minor incidents in recent years with gangs on the
            west side that skew heavily anti-AC such as DLGB (who a
            decade ago were loosely allied with RFC under "Figarollin")
            and Shotgun Crips (SGC) in Gardena. They mainly beef with
            Rollin' 20's NHB, CSB, JSB, VNGB, IFGB, DLGB, MOB, SGC,
            51TGC, 73GC, 83GC, 99MC, and all other Blood, Brim, Piru,
            Hoover, and Gangster Crip gangs.

            <br>Rappers: Ablue, Dody6, 8Beezy, NfantJahk (R.I.P), CBK4, Txny4, FAcey5`,
            image: "img/40rac.png",
            video: "video/40rac.mp4",
            joinUrl: "#"
        },
    ];

    const initialGangId = "apb";
    const initialGangIndex = gangs.findIndex((gang) => gang.id === initialGangId);
    let currentGangIndex = initialGangIndex >= 0 ? initialGangIndex : 0;

    const ensurePlayback = () => {
        const playPromise = video.play();
        if (playPromise && typeof playPromise.catch === "function") {
            playPromise.catch(() => {
            });
        }
    };



In the rendergang function, if the video changes dynamically when you change/choose a band, you should have something like this:


JavaScript:
function renderGang(index) {
    const gang = gangs[index];
    
        const video = document.getElementById("mividio");
        const source = video.querySelector("source");
    
        source.src = gang.video;  //this updates the route
        video.load();             //This reloads the video with the new src
        video.play();             //And this play the video.
 

Evolutionnn

Новый участник
3 Окт 2024
23
0
38
The question is: does your renderGang function dynamically update the video's source? Because if it doesn't, it will always display apb.webm and not the current band's video.



In this file, you still have it set as .mp4

JavaScript:
document.addEventListener("DOMContentLoaded", () => {
    const video = document.getElementById("myVideo");
    const volumeSlider = document.getElementById("volumeSlider");
    const volumeIcon = document.getElementById("volumeIcon");
    const volumeButton = document.getElementById("volumeButton");
    const gangImage = document.getElementById("gangImage");
    const gangHeaderTitle = document.getElementById("gangHeaderTitle");
    const gangName = document.getElementById("gangName");
    const gangDescription = document.getElementById("gangDescription");

    if (!video || !volumeSlider || !volumeIcon || !gangImage || !gangHeaderTitle || !gangName || !gangDescription) {
        return;
    }

    const gangs = [
        {
            id: "apb",
            title: "E/S Athens Park Bloods",
            name: "E/S Athens Park Bloods",
            description: `Part of NWA, APB is a large and highly
                reputable Blood gang located in the
                Athens/Willowbrook area on the East
                side, main cliques are 124th, 127th, and
                132nd. Formerly known as the Athens
                Park Boys, APB is one of the original five
                sets in the city that banded together to
                form the Bloods in 1972. As early and
                long-standing rivalries with Crip gangs
                like 118ECBC and others influenced them
                and other sets that feuded with Crips to
                adopt their own color and name. APB for
                the longest has been allied with MGB to
                form Athens Miller Gangster Bloods
                (AMGB), though they’ve also recently
                cliqued up with CPP/WSP to form NWA
                (Nellaz West Athens). Despite being a
                east side Blood gang, the younger
                generation of AMGB is loosely affiliated
                with SMG politics, as the majority of Crip
                gangs they beef with claim BC/NHC/2X,
                and their relationship with most GC/HCG
                sets are neutral due to common
                enemies. Their main rivals presently are
                116KCG, 118ECBC, and 120RAC. Though
                they have lesser beefs with BHWB, PJWC,
                CPCC, MPCC, TPCC, OSCC, FHCC, SGC,
                PBC, VAC, and most other Avenue Crip,
                Blocc Crip, Neighborhood Crip, and
                Compton Crip gangs.

                <br>Rappers: RJ, Ceddy Mack`,
            image: "img/apb.png",
            video: "video/apb.mp4",
            joinUrl: "#"
        },
        {
            id: "40rac",
            title: "W/S Rollin' 40's Avenue Crips",
            name: "W/S Rollin' 40's Avenue Crips",
            description: `Part of the Rollin' 40's (RFC), are also known as Vernon
            Avenue Crips or A-Town. The Avenue side of the Rollin' 40's
            (RFC) is the westernmost side of their hood that stretches
            from Crenshaw Boulevard to Arlington Avenue. Are located
            in the Leimert Park district, which is one of the few
            predominately Black/Belizean American/African American
            neighborhoods left in Los Angeles County; and also the
            area that non-affiliate LA rapper Dom Kennedy grew up in.
            Historically represented by the Los Angeles Angels and
            Arizona Wildcats logos with cerulean (teal) rags and red
            Angels logos; the Avenues clique is understood to be the
            more preppy and "flyer" side of their hood (more expensive
            housing market prices, more Nike Tech suits, and less Pro
            Club t-shirt and wifebeaters fits on members as seen the
            further east you go). Leimert Park itself also has a more
            positive and upscale reputation than the rest of South
            Central due to being the epicenter of Black Los Angeles
            culturally and hosting popular annual citywide events such
            as the Juneteenth Festival and MLK Day Parade that are
            attended by thousands near 43rd/King and Crenshaw
            Boulevard. Their main beefs historically are with BPS across
            Crenshaw Boulevard in a gang war that's gone on for over
            five decades and resulted in numerous incidents and
            deaths. And is also one that makes local social media news
            headlines annually when gang fights breakout between
            youths from both sides (and their allies) on Crenshaw
            Boulevard during annual MLK Day Parade. The Avenues
            clique also differs from the other sides (Western, Parcside,
            and Darcside) in that they historically push NHC the least
            out of all five sides, and instead primarily claim and fall
            under Avenue Crip (AC) along with RAC. And most
            members (similar to 104HTHC being a Hustler Crip/NHC-
            hybrid) claim either AC solely (mainly where the younger
            generation is concerned) or both. Though despite
            differences in lineage, both the Avenues (R40AC) and the
            other four sides (R40NHC) are mostly considered the
            synonymous under RFC/OSE/Glove Gang. The Avenues
            clique as a predominately AC side was further solidified
            after the now cease fired war between former allies the
            Rollin' 40's and Rollin' 60's NHC broke out between the two
            gangs in 2013, as Rollin' 40's AC sits directly on the<
            borderline of the two major hoods on 48th and Crenshaw
            Boulevard. And due to the Rollin 60's ties with the Rollin'
            100's (600), the 40's have also had sporadic issues and is
            distant at best with the Rollin' 100's BC gangs. Their>br>
            increased identification with AC politics post-2010s has
            further dragged them into formerly dormant or non-existent
            beefs via minor incidents in recent years with gangs on the
            west side that skew heavily anti-AC such as DLGB (who a
            decade ago were loosely allied with RFC under "Figarollin")
            and Shotgun Crips (SGC) in Gardena. They mainly beef with
            Rollin' 20's NHB, CSB, JSB, VNGB, IFGB, DLGB, MOB, SGC,
            51TGC, 73GC, 83GC, 99MC, and all other Blood, Brim, Piru,
            Hoover, and Gangster Crip gangs.

            <br>Rappers: Ablue, Dody6, 8Beezy, NfantJahk (R.I.P), CBK4, Txny4, FAcey5`,
            image: "img/40rac.png",
            video: "video/40rac.mp4",
            joinUrl: "#"
        },
    ];

    const initialGangId = "apb";
    const initialGangIndex = gangs.findIndex((gang) => gang.id === initialGangId);
    let currentGangIndex = initialGangIndex >= 0 ? initialGangIndex : 0;

    const ensurePlayback = () => {
        const playPromise = video.play();
        if (playPromise && typeof playPromise.catch === "function") {
            playPromise.catch(() => {
            });
        }
    };



In the rendergang function, if the video changes dynamically when you change/choose a band, you should have something like this:


JavaScript:
function renderGang(index) {
    const gang = gangs[index];
 
        const video = document.getElementById("mividio");
        const source = video.querySelector("source");
 
        source.src = gang.video;  //this updates the route
        video.load();             //This reloads the video with the new src
        video.play();             //And this play the video.
1777059303722.png

Я исправил ошибку с mp4, для теста я временно отключил функцию динамического обновления фракций и создал вручную массив прямо в js, в любом случае; это не помогло :\
I fixed the mp4 issue. For testing purposes, I temporarily disabled the dynamic faction update feature and manually created an array directly in JavaScript, but it didn't help :\


JavaScript:
const gangs = [
    {
id: "apb",
title: "E/S Athens Park Bloods",
name: "E/S Athens Park Bloods",
description: `Part of NWA, APB is a large and highly
            reputable Blood gang located in the
            Athens/Willowbrook area on the East
            side, main cliques are 124th, 127th, and
            132nd. Formerly known as the Athens
            Park Boys, APB is one of the original five
            sets in the city that banded together to
            form the Bloods in 1972. As early and
            long-standing rivalries with Crip gangs
            like 118ECBC and others influenced them
            and other sets that feuded with Crips to
            adopt their own color and name. APB for
            the longest has been allied with MGB to
            form Athens Miller Gangster Bloods
            (AMGB), though they’ve also recently
            cliqued up with CPP/WSP to form NWA
            (Nellaz West Athens). Despite being a
            east side Blood gang, the younger
            generation of AMGB is loosely affiliated
            with SMG politics, as the majority of Crip
            gangs they beef with claim BC/NHC/2X,
            and their relationship with most GC/HCG
            sets are neutral due to common
            enemies. Their main rivals presently are
            116KCG, 118ECBC, and 120RAC. Though
            they have lesser beefs with BHWB, PJWC,
            CPCC, MPCC, TPCC, OSCC, FHCC, SGC,
            PBC, VAC, and most other Avenue Crip,
            Blocc Crip, Neighborhood Crip, and
            Compton Crip gangs.

            <br>Rappers: RJ, Ceddy Mack`,
image: "img/apb.png",
video: "video/apb.webm",
joinUrl: "#"
    },
    {
id: "40rac",
title: "WORK??",
name: "W/S Rollin' 40's Avenue Crips",
description: `Part of the Rollin' 40's (RFC), are also known as Vernon
        Avenue Crips or A-Town. The Avenue side of the Rollin' 40's
        (RFC) is the westernmost side of their hood that stretches
        from Crenshaw Boulevard to Arlington Avenue. Are located
        in the Leimert Park district, which is one of the few
        predominately Black/Belizean American/African American
        neighborhoods left in Los Angeles County; and also the
        area that non-affiliate LA rapper Dom Kennedy grew up in.
        Historically represented by the Los Angeles Angels and
        Arizona Wildcats logos with cerulean (teal) rags and red
        Angels logos; the Avenues clique is understood to be the
        more preppy and "flyer" side of their hood (more expensive
        housing market prices, more Nike Tech suits, and less Pro
        Club t-shirt and wifebeaters fits on members as seen the
        further east you go). Leimert Park itself also has a more
        positive and upscale reputation than the rest of South
        Central due to being the epicenter of Black Los Angeles
        culturally and hosting popular annual citywide events such
        as the Juneteenth Festival and MLK Day Parade that are
        attended by thousands near 43rd/King and Crenshaw
        Boulevard. Their main beefs historically are with BPS across
        Crenshaw Boulevard in a gang war that's gone on for over
        five decades and resulted in numerous incidents and
        deaths. And is also one that makes local social media news
        headlines annually when gang fights breakout between
        youths from both sides (and their allies) on Crenshaw
        Boulevard during annual MLK Day Parade. The Avenues
        clique also differs from the other sides (Western, Parcside,
        and Darcside) in that they historically push NHC the least
        out of all five sides, and instead primarily claim and fall
        under Avenue Crip (AC) along with RAC. And most
        members (similar to 104HTHC being a Hustler Crip/NHC-
        hybrid) claim either AC solely (mainly where the younger
        generation is concerned) or both. Though despite
        differences in lineage, both the Avenues (R40AC) and the
        other four sides (R40NHC) are mostly considered the
        synonymous under RFC/OSE/Glove Gang. The Avenues
        clique as a predominately AC side was further solidified
        after the now cease fired war between former allies the
        Rollin' 40's and Rollin' 60's NHC broke out between the two
        gangs in 2013, as Rollin' 40's AC sits directly on the<
        borderline of the two major hoods on 48th and Crenshaw
        Boulevard. And due to the Rollin 60's ties with the Rollin'
        100's (600), the 40's have also had sporadic issues and is
        distant at best with the Rollin' 100's BC gangs. Their>br>
        increased identification with AC politics post-2010s has
        further dragged them into formerly dormant or non-existent
        beefs via minor incidents in recent years with gangs on the
        west side that skew heavily anti-AC such as DLGB (who a
        decade ago were loosely allied with RFC under "Figarollin")
        and Shotgun Crips (SGC) in Gardena. They mainly beef with
        Rollin' 20's NHB, CSB, JSB, VNGB, IFGB, DLGB, MOB, SGC,
        51TGC, 73GC, 83GC, 99MC, and all other Blood, Brim, Piru,
        Hoover, and Gangster Crip gangs.

        <br>Rappers: Ablue, Dody6, 8Beezy, NfantJahk (R.I.P), CBK4, Txny4, FAcey5`,
image: "img/40rac.png",
video: "video/40rac.webm",
joinUrl: "#"
    },
];


/*function setGangsInfo(gangsParse) {
    const gangsInfo = typeof gangsParse === "string" ? JSON.parse(gangsParse) : gangsParse;
    const gangsList = Array.isArray(gangsInfo) ? gangsInfo : Object.values(gangsInfo || {});

    gangs = gangsList.map((gang, index) => {
        const id = String(gang.id ?? index);
        const name = String(gang.name ?? gang.title ?? id);

        return {
            id,
            title: name,
            name,
            description: String(gang.description ?? ""),
            image: String(gang.image ?? `img/${id}.png`),
            video: String(gang.video ?? `video/${id}.webm`)
        };
    });

    currentGangIndex = 0;
    renderGang(currentGangIndex);
}*/

const initialGangId = "apb";
const initialGangIndex = gangs.findIndex((gang) => gang.id === initialGangId);
let currentGangIndex = initialGangIndex >= 0 ? initialGangIndex : 0;

const ensurePlayback = () => {
const playPromise = video.play();
if (playPromise && typeof playPromise.catch === "function") {
playPromise.catch(() => {
        });
    }
};

const updateVolumeIcon = (value) => {
volumeIcon.classList.remove("is-muted", "is-low", "is-high");
if (value === 0 || video.muted) {
volumeIcon.classList.add("is-muted");
return;
    }
if (value < 0.5) {
volumeIcon.classList.add("is-low");
return;
    }
volumeIcon.classList.add("is-high");
};

const renderGang = (index) => {
const gang = gangs[index];
if (!gang) {
return;
    }

gangHeaderTitle.textContent = gang.title;
gangName.textContent = gang.name;
gangDescription.innerHTML = String(gang.description || "").replace(/\n/g, "");
gangImage.style.backgroundImage = `url("${gang.image}")`;

const source = video.querySelector("source");
if (source && source.getAttribute("src") !== gang.video) {
source.setAttribute("src", gang.video);
video.load();
    }


ensurePlayback();
};

window.renderGang = renderGang;
 

PercyBerkeley

Участник портала
BackEnd developer
16 Ноя 2024
235
23
77
Something is failing somewhere, try this to debug


JavaScript:
const renderGang = (index) => {
    const gang = gangs[index];
    if (!gang) return;

    gangHeaderTitle.textContent = gang.title;
    gangName.textContent = gang.name;
    gangDescription.innerHTML = String(gang.description || "").replace(/\n/g, "");
    gangImage.style.backgroundImage = `url("${gang.image}")`;

    const source = video.querySelector("source");
    if (source && source.getAttribute("src") !== gang.video) {
        source.setAttribute("src", gang.video);
        video.load();
    }

    video.oncanplay = () => {
        video.play()
            .then(() => {
                console.log("video ok:", gang.video);
            })
            .catch((err) => {
                console.error("no se pudo reproducir:", err.message);
                console.log("src actual:", gang.video);
            });
    };

    video.onerror = () => {
        const e = video.error;
        console.error("error cargando video, codigo:", e?.code, e?.message);
    };
};


In the .video-control class of the .css file you have a '/' in z-index: 999; remove it. And in .video-background video, in object-fit, change none to cover
 

Evolutionnn

Новый участник
3 Окт 2024
23
0
38
Something is failing somewhere, try this to debug


JavaScript:
const renderGang = (index) => {
    const gang = gangs[index];
    if (!gang) return;

    gangHeaderTitle.textContent = gang.title;
    gangName.textContent = gang.name;
    gangDescription.innerHTML = String(gang.description || "").replace(/\n/g, "");
    gangImage.style.backgroundImage = `url("${gang.image}")`;

    const source = video.querySelector("source");
    if (source && source.getAttribute("src") !== gang.video) {
        source.setAttribute("src", gang.video);
        video.load();
    }

    video.oncanplay = () => {
        video.play()
            .then(() => {
                console.log("video ok:", gang.video);
            })
            .catch((err) => {
                console.error("no se pudo reproducir:", err.message);
                console.log("src actual:", gang.video);
            });
    };

    video.onerror = () => {
        const e = video.error;
        console.error("error cargando video, codigo:", e?.code, e?.message);
    };
};


In the .video-control class of the .css file you have a '/' in z-index: 999; remove it. And in .video-background video, in object-fit, change none to cover

Я исправил все недочеты как ты просил, а так-же попытался добавить обработчик ошибок; но он просто не вызывался.
Я так-же решил попробовать создать новый CEF где показывается одно видео и текст (для понимания что CEF успешно подключен) и ничего более. Как итог:
в браузере все по прежнему работает идеально, но в игре отображается лишь текст. Как я понял, скорее всего тут проблема на стороне RAGE. И у меня есть вопрос: Я могу попробовать конвертировать gif из моих старых видео в 60fps, а так-же просто сверху накинуть музыку в mp4. Ведь по идее - это одно и тоже, верно? Хоть это и костыль, но другого варианта я для себя просто не вижу. Я так-же прикреплю код тестового скрипта, вдруг появится какая-то идея? Так-же хотел бы поблагодарить за помощь на протяжении всех этих долгих дней :D

I fixed all the issues as you requested, and I also tried to add an error handler; but it simply wasn't being called.
I also decided to try creating a new CEF that displays a single video and some text (to confirm that the CEF is connected successfully) and nothing else. The result:
Everything still works perfectly in the browser, but only text is displayed in the game. As I understand it, the problem is most likely on the RAGE side. And I have a question: Can I try converting a GIF from my old videos to 60fps, and also just overlay some music in MP4? After all, in theory, it’s the same thing, right? Even though it’s a workaround, I just don’t see any other option for myself. I’ll also attach the code for the test script—maybe someone will have an idea? I’d also like to thank you for your help throughout all these long days :D


изображение_2026-04-25_051422007.png

изображение_2026-04-25_051524076.png

JavaScript:
<!DOCTYPE html>
<html>
<head>
    <title>TEEST</title>
    <meta charset="UTF-8">
    <style>
        video {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        p {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: white;
            font-size: 50px;
            z-index: 10;
        }
    </style>
</head>
<body>
<video autoplay muted loop playsinline>
    <source src="video/video.webm" type="video/webm">
</video>
<p>LOLHEWORK</p>

<script>
    const video = document.querySelector('video');
    video.play().catch(e => console.log(e));
</script>
</body>
</html>
 

Evolutionnn

Новый участник
3 Окт 2024
23
0
38
Я тут циферки прикинул, GIF не получается. Тогда я честно уж и не знаю что делать :\
I did some quick calculations, but the GIF isn't working. Honestly, I have no idea what to do now :\
 

PercyBerkeley

Участник портала
BackEnd developer
16 Ноя 2024
235
23
77
I was curious why it wasn't working, so I revisited the code in this repository I'd saved for a while:


They use this:
this.instance = mp.browsers.newHeadless(url, width, height);

This is an invisible browser that renders as a 3D texture. It's completely different from a normal CEF browser. And the interesting thing is that YouTube works in the example, which means that autoplay video DOES work in headless browsers.

So give this a try, you've got nothing to lose:


en tu client-side:

Код:
let textureLoaded = false;

mp.events.add('render', () => {
    if (!browser.active) return;

    if (!textureLoaded) {
        mp.game.graphics.requestStreamedTextureDict(browser.headlessTextureDict, true);
        if (!mp.game.graphics.hasStreamedTextureDictLoaded(browser.headlessTextureDict)) return;
        textureLoaded = true;
    }

    mp.game.graphics.drawSprite(
        browser.headlessTextureDict,
        browser.headlessTextureName,
        0.5, 0.5,
        1.0, 1.0,
        0,
        255, 255, 255, 255
    );
});
 
Последнее редактирование:
Реакции: Evolutionnn

Evolutionnn

Новый участник
3 Окт 2024
23
0
38
I was curious why it wasn't working, so I revisited the code in this repository I'd saved for a while:


They use this:
this.instance = mp.browsers.newHeadless(url, width, height);

This is an invisible browser that renders as a 3D texture. It's completely different from a normal CEF browser. And the interesting thing is that YouTube works in the example, which means that autoplay video DOES work in headless browsers.

So give this a try, you've got nothing to lose:


en tu client-side:

Код:
let textureLoaded = false;

mp.events.add('render', () => {
    if (!browser.active) return;

    if (!textureLoaded) {
        mp.game.graphics.requestStreamedTextureDict(browser.headlessTextureDict, true);
        if (!mp.game.graphics.hasStreamedTextureDictLoaded(browser.headlessTextureDict)) return;
        textureLoaded = true;
    }

    mp.game.graphics.drawSprite(
        browser.headlessTextureDict,
        browser.headlessTextureName,
        0.5, 0.5,
        1.0, 1.0,
        0,
        255, 255, 255, 255
    );
});



Behind the scenes, I also tried the WebM format, but it doesn't work either, just like MP4. I honestly don't know what's wrong; maybe I'm just seeing things and we're missing some important, silly detail—I honestly don't know, hahaha. Maybe I'm specifying the path to the video incorrectly, or something else? I don't know. I’ll try downloading the Browser3D class you sent right now; maybe the YouTube link will work after all—I don’t know...
 

Similar threads