{"id":3410,"date":"2021-05-03T07:54:32","date_gmt":"2021-05-03T07:54:32","guid":{"rendered":"https:\/\/hainaut.sudradio.net\/?p=3410"},"modified":"2023-12-28T18:00:21","modified_gmt":"2023-12-28T18:00:21","slug":"podcasts-le-croissant-show","status":"publish","type":"post","link":"https:\/\/hainaut.sudradio.net\/?p=3410","title":{"rendered":"PODCASTS &#8211; Le Croissant Show"},"content":{"rendered":"\n<div class=\"row\">\n  <div class=\"col-12 col-sm-12 col-md-12 col-lg-4 col-xl-4\">\n    <img decoding=\"async\" src=\"https:\/\/hainaut.sudradio.net\/wp-content\/uploads\/2021\/01\/SUDLOGO.png\" width=\"100%\" class=\"SUD_TABLE_IMG\">\n  <\/div>\n  <div class=\"col-12 col-sm-12 col-md-12 col-lg-8 col-xl-8\">\n    <div class=\"SUD_PODCAST_TITRE\"><\/div>\n    <p class=\"SUD_PODCAST_PARAGRAPHE\">Retrouvez les invit\u00e9s du Croissant Show en replay et tous les vendredis de 7h \u00e0 9h sur SUD RADIO<br><br>Bonne (r\u00e9)\u00e9coute !     \n    <\/p>\n  <\/div>\n<\/div>\n  \n<div id=\"PlayerBOX\">\n    <div class=\"row\">\n        <div class=\"col-12\">  \n            <div id=\"waveform\"><\/div>  \n        <\/div>\n    <\/div>\n\n    <div class=\"row\">\n        <div class=\"col-1\">  \n            Volume:\n        <\/div>\n        <div class=\"col-9\">  \n          <div class=\"volbox\">\n            <input id=\"volumeSlider\" type=\"range\" min=\"0\" max=\"1\" value=\"1\" step=\"0.01\" style=\"width: 100%; \">\n          <\/div>\n        <\/div>\n        <div class=\"col-2\">  \n            <button type=\"button\" class=\"btn btn-warning w-100\" id=\"PlayPause\">Pause<\/button>\n        <\/div>    \n    <\/div>\n<\/div>\n<br>\n<div class=\"row\">\n  <div class=\"col-12\">\n    <script>   \n    \n    $(\"#PlayerBOX\").hide();\n    \n    $(document).ready(function()\n    {\n        var wavesurfer = WaveSurfer.create({\n            container: document.querySelector('#waveform'),\n            backend: 'MediaElement',\n            waveColor: '#D9DCFF',\n            progressColor: '#4353FF',\n            cursorColor: '#4353FF',\n            barWidth: 3,\n            barRadius: 3,\n            cursorWidth: 1,\n            minPxPerSec: 5,\n            height: 200,\n            barGap: 3,            \n            pixelRatio: 1,\n            plugins: [\n                WaveSurfer.regions.create({})\n            ]            \n        });        \n        \n        PODCAST = $('#PODCAST').DataTable({\n            \"language\": { \"url\": \"\/wp-content\/themes\/SudRadio-2020\/assets\/lang\/datatable.francais.lang\" },\n            \"order\" : [[ 0 , \"desc\" ]],\n            rowId: \"path\",\n            \"ajax\": {\n                   \"url\": ajaxurl,\n                   \"type\": 'POST',\n                   \"data\": {\n                      'action':'podcast',\n                      'rubrique' : 'croissant',\n                   },\n               },       \n            columns: [\n                { data: \"dateDiffusion\"\n                    ,className: \"selectable\", responsivePriority: 5,\n                    render: function (data, type, row) {\n                        moment.locale('fr');\n                        var goodDate = moment(row.dateDiffusion,\"YYYYMMDD\").format('dddd LL','fr');\n \n                        return '<span style=\"display:none;\">' + row.dateDiffusion + '<\/span>' + goodDate\n                    }\n                },      \n                { data: \"podcast\" },      \n                {\n                    data: \"path\",\n                    className: \"center\",\n                    render: function (data, type, row) {\n                        return `<button type=\"button\" class=\"btn btn-secondary\">Ecouter !<\/button>`;                        \n                    }\n                },\n            ],\n            responsive: true,\n            columnDefs: [\n                { responsivePriority: 0 },\n                { responsivePriority: 1 },\n                { responsivePriority: 2 },\n            ],\n        });  \n        \n        $('#PODCAST').on( 'click', 'tr', function () {\n            var idSelected = PODCAST.row( this ).id();\n\n            if (idSelected !== undefined )   \n            {\n                $(\"#PlayerBOX\").show(500);\n                \n                console.log(\"Asked \" + 'https:\/\/hainaut.sudradio.net\/' + idSelected);\n                wavesurfer.load('https:\/\/hainaut.sudradio.net\/' + idSelected);\n                \n                if (wavesurfer.isPlaying()) wavesurfer.stop();\n                wavesurfer.play();\n                \n                \/\/ Charge les r\u00e9gions !\n                fetch(\"https:\/\/hainaut.sudradio.net\/podcasts\/croissant\/20210305.json\")\n                  .then(response => response.json())\n                  .then(json => wavesurfer.addRegion(json));\n                \n            }\n        });    \n\n        $(\"#volumeSlider\").on(\"input\", function (e) {\n            wavesurfer.setVolume(e.target.value);         \n        });\n\n        $(\"#volumeSlider\").on(\"change\", function (e) {\n            wavesurfer.setVolume(e.target.value);        \n        });\n        \n        $(\"#PlayPause\").on(\"click\", function () {\n            if (wavesurfer.isPlaying()) \n            {\n                $(\"#PlayPause\").html(\"Play\");\n                wavesurfer.pause();\n            }\n            else \n            {\n                $(\"#PlayPause\").html(\"Pause\");\n                wavesurfer.play();\n            }\n        });\n    });       \n    <\/script>\n   \n    <table id=\"PODCAST\" class=\"display\" style=\"width:100%\">\n        <thead>  \n            <tr>\n                <th style=\"width:30%\">Date<\/th>\n                <th>Emission<\/th>\n                <th style=\"width:75px\">Ecouter !<\/th>\n            <\/tr>\n        <\/thead>\n        <tbody>\n        <\/tbody>\n    <\/table>      \n   \n  <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Retrouvez les invit\u00e9s du Croissant Show en replay et tous les vendredis de 7h \u00e0 9h sur SUD RADIO Bonne (r\u00e9)\u00e9coute ! Volume: Pause Date Emission Ecouter !<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3410","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/hainaut.sudradio.net\/index.php?rest_route=\/wp\/v2\/posts\/3410","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hainaut.sudradio.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hainaut.sudradio.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hainaut.sudradio.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hainaut.sudradio.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3410"}],"version-history":[{"count":8,"href":"https:\/\/hainaut.sudradio.net\/index.php?rest_route=\/wp\/v2\/posts\/3410\/revisions"}],"predecessor-version":[{"id":21047,"href":"https:\/\/hainaut.sudradio.net\/index.php?rest_route=\/wp\/v2\/posts\/3410\/revisions\/21047"}],"wp:attachment":[{"href":"https:\/\/hainaut.sudradio.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3410"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hainaut.sudradio.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3410"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hainaut.sudradio.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3410"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}